Skip to content

Commit 72bc79b

Browse files
authored
fix PkgConfigHint test on systems that do not have pkg-config instaled (#3757)
motivation: fix CI changes: change assumption in test about single diagnostic emitted, as there may be more on systems that do not have pkg-config instaled
1 parent 0b32801 commit 72bc79b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,11 +1624,10 @@ final class BuildPlanTests: XCTestCase {
16241624
fileSystem: fileSystem
16251625
)
16261626

1627-
guard let diagnostic = observability.diagnostics.first else {
1628-
return XCTFail("Expected a diagnostic")
1629-
}
1630-
XCTAssertMatch(diagnostic.message, .contains("you may be able to install BTarget using your system-packager"))
1631-
XCTAssertEqual(diagnostic.severity, .warning)
1627+
XCTAssertTrue(observability.diagnostics.contains(where: {
1628+
$0.severity == .warning &&
1629+
$0.message.hasPrefix("you may be able to install BTarget using your system-packager")
1630+
}), "expected PkgConfigHint diagnostics")
16321631
}
16331632

16341633
func testPkgConfigGenericDiagnostic() throws {

0 commit comments

Comments
 (0)