From 4e0aeafb1c5030851838a5579bb9f918d5f9f315 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 10 Jul 2023 07:40:06 -0700 Subject: [PATCH] tests: loosen expectations on WorkspaceTests Some targets use pre-compiled manifests instead of interpretation. Such a manifest will copy the `Package.swift` to `manifest.swift` and change the location. As a result, the prefix expectation on the filename will fail. Loosen the condition to accommodate the implementation. --- Tests/WorkspaceTests/WorkspaceTests.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Tests/WorkspaceTests/WorkspaceTests.swift b/Tests/WorkspaceTests/WorkspaceTests.swift index a1808dae649..618933af13c 100644 --- a/Tests/WorkspaceTests/WorkspaceTests.swift +++ b/Tests/WorkspaceTests/WorkspaceTests.swift @@ -242,9 +242,7 @@ final class WorkspaceTests: XCTestCase { testDiagnostics(observability.diagnostics) { result in let diagnostic = result.check( - diagnostic: .contains( - "\(pkgDir.appending("Package.swift")):4:8: error: An error in MyPkg" - ), + diagnostic: .contains(":4:8: error: An error in MyPkg"), severity: .error ) XCTAssertEqual(diagnostic?.metadata?.packageIdentity, .init(path: pkgDir))