From c98a36fc7cb1547681c746b9d2dc3785b3242337 Mon Sep 17 00:00:00 2001 From: Doug Gregor Date: Sat, 24 Feb 2024 08:25:11 -1000 Subject: [PATCH] Generalize test to handle the compiler's new diagnostic printing style --- Tests/FunctionalTests/MiscellaneousTests.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/FunctionalTests/MiscellaneousTests.swift b/Tests/FunctionalTests/MiscellaneousTests.swift index fb3f5033ed1..b5e5dc3e28f 100644 --- a/Tests/FunctionalTests/MiscellaneousTests.swift +++ b/Tests/FunctionalTests/MiscellaneousTests.swift @@ -89,7 +89,8 @@ class MiscellaneousTestCase: XCTestCase { return XCTFail("failed in an unexpected manner: \(error)") } XCTAssertMatch(error.stdout + error.stderr, .contains("Compiling CompileFails Foo.swift")) - XCTAssertMatch(error.stdout + error.stderr, .regex("error: .*\n.*compile_failure")) + XCTAssertMatch(error.stdout + error.stderr, .regex(".*compile_failure.*")) + XCTAssertMatch(error.stdout + error.stderr, .regex(".*error:.*")) } } }