Skip to content

Commit 4e5d84f

Browse files
committed
Try to fix test on 0.6
1 parent 5be9dd8 commit 4e5d84f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/runtests.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,14 @@ end
13071307

13081308
# 0.7.0-DEV.3585
13091309
let buf = IOBuffer()
1310-
printstyled(IOContext(buf, :color=>true), "foo", color=:red)
1310+
if VERSION < v"0.7.0-DEV.3077"
1311+
col = Base.have_color
1312+
eval(Base, :(have_color = true))
1313+
printstyled(buf, "foo", color=:red)
1314+
eval(Base, :(have_color = $col))
1315+
else
1316+
printstyled(IOContext(buf, :color=>true), "foo", color=:red)
1317+
end
13111318
@test startswith(String(take!(buf)), Base.text_colors[:red])
13121319
end
13131320

0 commit comments

Comments
 (0)