@@ -183,20 +183,23 @@ end
183183@testset " failing test" begin
184184 testsuite = Dict (
185185 " failing test" => quote
186+ println (" This test will fail" )
186187 @test 1 == 2
187188 end
188189 )
189190 error_line = @__LINE__ () - 3
190191
191192 io = IOBuffer ()
193+ ioc = IOContext (io, :color => true )
192194 @test_throws Test. FallbackTestSetException (" Test run finished with errors" ) begin
193- runtests (ParallelTestRunner, [" --verbose" ]; testsuite, stdout = io , stderr = io )
195+ runtests (ParallelTestRunner, [" --verbose" ]; testsuite, stdout = ioc , stderr = ioc )
194196 end
195197
196198 str = String (take! (io))
197- @test contains (str, r" failing test .+ failed at" )
199+ @test contains (str, r" failing test.+ failed at" )
198200 @test contains (str, " $(basename (@__FILE__ )) :$error_line " )
199201 @test contains (str, " FAILURE" )
202+ @test contains (str, " Output generated during execution of '\e [31mfailing test\e [39m':" )
200203 @test contains (str, " Test Failed" )
201204 @test contains (str, " 1 == 2" )
202205end
@@ -263,11 +266,13 @@ end
263266 )
264267
265268 io = IOBuffer ()
269+ ioc = IOContext (io, :color => true )
266270 @test_throws Test. FallbackTestSetException (" Test run finished with errors" ) begin
267- runtests (ParallelTestRunner, [" --verbose" ]; testsuite, stdout = io , stderr = io )
271+ runtests (ParallelTestRunner, [" --verbose" ]; testsuite, stdout = ioc , stderr = ioc )
268272 end
269273
270274 str = String (take! (io))
275+ @test contains (str, " Output generated during execution of '\e [31mabort\e [39m':" )
271276 # Make sure we can capture the output generated by the crashed process, see
272277 # issue <https://github.com/JuliaTesting/ParallelTestRunner.jl/issues/83>.
273278 @test contains (str, msg)
276281 @test contains (str, " in expression starting at" )
277282 # Following are messages printed by ParallelTestRunner.
278283 @test contains (str, r" abort .+ started at" )
279- @test contains (str, r" abort .+ crashed at" )
284+ @test contains (str, r" abort.+ crashed at" )
280285 @test contains (str, " FAILURE" )
281286 @test contains (str, " Error During Test" )
282287 @test contains (str, " Malt.TerminatedWorkerException" )
0 commit comments