Skip to content

Commit c5189e9

Browse files
committed
Fix stdout tests
1 parent 5225c00 commit c5189e9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ include("exceptions.jl")
1313
v()
1414
include("nesting.jl")
1515
v()
16-
include("benchmark.jl")
17-
v()
1816
include("starting.jl")
1917
v()
2018
include("stdout.jl")
2119
v()
20+
include("benchmark.jl")
21+
v()
2222

2323
#TODO:
2424
# test that worker.expected_replies is empty after a call

test/stdout.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ using IOCapture
1717
@test occursin(blue, s)
1818
@test !occursin(yellow, s)
1919
@test occursin(r"worker"i, s)
20+
@test 1 <= count("\n", s) <= 2
2021

2122
s = cap(:(println(stderr, "hello")))
2223
@test occursin("hello", s)
2324
@test !occursin(blue, s)
24-
@test occursin(yellow, s)
25+
@test occursin(yellow, s)
26+
@test 1 <= count("\n", s) <= 2
2527

2628
s = cap(:(println("hello\nworld")))
2729
@test occursin("hello", s)
2830
@test occursin("world", s)
2931
@test count(blue, s) == 2
3032
@test count(yellow, s) == 0
31-
@test count("\n", s) >= 4
33+
@test 2 <= count("\n", s) <= 3
3234

3335
m.stop(w)
3436
end

0 commit comments

Comments
 (0)