Skip to content

Commit d516d87

Browse files
committed
Fix scope issue with orig_color
this only worked because of an 0.6-specific bug in scope that will be backported for rc3
1 parent aef62de commit d516d87

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/display.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
explines = sort(split(expected, "\n"))
1111
@test outlines == explines
1212
end
13+
orig_color = Base.have_color
1314
@testset "Array diffs print correctly" begin
1415
d1 = deepdiff([1, 2, 7, 3], [2, 3, 4, 1, 2, 3, 5])
1516
d2 = deepdiff([1], [2])
1617

1718
buf = IOBuffer()
18-
orig_color = Base.have_color
1919
eval(Base, :(have_color=true))
2020
# in 0.6 colored output is no longer bold as of PR #18628
2121
if VERSION < v"0.6.0-dev.1574"
@@ -83,7 +83,6 @@
8383
)
8484

8585
@testset "Color Diffs" begin
86-
orig_color = Base.have_color
8786
eval(Base, :(have_color=true))
8887
buf = IOBuffer()
8988
display(TextDisplay(buf), d)
@@ -164,7 +163,6 @@
164163

165164
@testset "single-line strings display correctly" begin
166165
# this test is just to handle some cases that don't get exercised elsewhere
167-
orig_color = Base.have_color
168166
diff = deepdiff("abc", "adb")
169167
buf = IOBuffer()
170168
eval(Base, :(have_color=false))
@@ -187,7 +185,6 @@
187185
output"""
188186
diff = deepdiff(s1, s2)
189187
buf = IOBuffer()
190-
orig_color = Base.have_color
191188
@testset "Color Display" begin
192189
eval(Base, :(have_color=true))
193190
# in 0.6 colored output is no longer bold as of PR #18628

0 commit comments

Comments
 (0)