File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 230230 @test contains (str, " SUCCESS" )
231231end
232232
233+ # Issue <https://github.com/JuliaTesting/ParallelTestRunner.jl/issues/69>.
234+ @testset " Colorful output" begin
235+ testsuite = Dict (
236+ " color" => quote
237+ printstyled (" Roses Are Red" ; color= :red )
238+ end
239+ )
240+ io = IOBuffer ()
241+ ioc = IOContext (io, :color => true )
242+ runtests (ParallelTestRunner, String[]; testsuite, stdout = ioc, stderr = ioc)
243+ str = String (take! (io))
244+ @test contains (str, " \e [31mRoses Are Red\e [39m" )
245+ @test contains (str, " SUCCESS" )
246+
247+ testsuite = Dict (
248+ " no color" => quote
249+ printstyled (" Violets are blue" ; color= :blue )
250+ end
251+ )
252+ io = IOBuffer ()
253+ runtests (ParallelTestRunner, String[]; testsuite, stdout = io, stderr = io)
254+ str = String (take! (io))
255+ @test contains (str, " Violets are blue" )
256+ @test ! contains (str, " \e [39m" )
257+ @test contains (str, " SUCCESS" )
258+ end
259+
233260end
You can’t perform that action at this time.
0 commit comments