Skip to content

Commit

Permalink
Make include trick work on 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack committed Feb 2, 2018
1 parent 34cd5d8 commit d40dd8b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions samples/sample_copy_path_flat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for x in opath
end
s1 = repr(x.points)
move_to(cr,10.0,16.0+(14.0*l))
l += 1
global l += 1
show_text(cr,s0*s1)
end

Expand All @@ -59,7 +59,7 @@ for x in fpath
end
s1 = repr(x.points)
move_to(cr,10.0,50.0+(14.0*l))
l += 1
global l += 1
show_text(cr,s0*s1)
end

Expand Down
2 changes: 1 addition & 1 deletion samples/sample_script0.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ t1 = 24.0
for x in r1
move_to(cr,0.0,t1)
show_text(cr,x)
t1 += 12.0
global t1 += 12.0
end


Expand Down
5 changes: 4 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ end
end

@testset "sample: $test_file_name" for test_file_name in samples_files
mod = Module(Symbol(test_file_name))
# Run each sample script in a separate module to avoid pollution
s = Symbol(test_file_name)
mod = @eval(Main, module $s end)
@eval mod include($(joinpath(samples_dir_path, test_file_name)))

output_png_name = replace(test_file_name,".jl",".png")
@test isfile(output_png_name)
rm(output_png_name)
Expand Down

0 comments on commit d40dd8b

Please sign in to comment.