Skip to content

Commit c155e8d

Browse files
author
David Ungar
authored
Merge pull request #453 from davidungar/when-testing-diags-ensure-bw
Add argument to ensure B&W diagnostics when checking diagnostics
2 parents 860e677 + 307f4ed commit c155e8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/SwiftDriverTests/Helpers/AssertDiagnostics.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ func assertDriverDiagnostics(
3636
file: StaticString = #file, line: UInt = #line,
3737
do body: (inout Driver, DiagnosticVerifier) throws -> Void
3838
) throws {
39+
// Ensure there are no color codes in order to make matching work
40+
let argsInBlackAndWhite = [args[0], "-no-color-diagnostics"] + args.dropFirst()
3941
try assertDriverDiagnostics(
40-
args: args, env: env, file: file, line: line, do: body
42+
args: argsInBlackAndWhite, env: env, file: file, line: line, do: body
4143
)
4244
}
4345

0 commit comments

Comments
 (0)