Skip to content

Commit 0534456

Browse files
committed
Add output test.
1 parent 92b48f4 commit 0534456

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/runtests.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,20 @@ end
112112
@test contains(str, "This test throws an error")
113113
end
114114

115+
@testset "test output" begin
116+
custom_tests = Dict(
117+
"output" => quote
118+
println("This is some output from the test")
119+
end
120+
)
121+
122+
io = IOBuffer()
123+
runtests(["--verbose"]; custom_tests, stdout=io, stderr=io)
124+
125+
str = String(take!(io))
126+
@test contains(str, r"output .+ started at")
127+
@test contains(str, r"This is some output from the test")
128+
@test contains(str, "SUCCESS")
129+
end
130+
115131
end

0 commit comments

Comments
 (0)