Skip to content

Commit

Permalink
Add test for #718
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jan 6, 2024
1 parent ef86df2 commit dcee3ec
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,45 @@ const issue639report = []
pop!(LOAD_PATH)
end

do_test("Submodule in same file (#718)") && @testset "Submodule in same file (#718)" begin
testdir = newtestdir()
dn = joinpath(testdir, "TestPkg718", "src")
mkpath(dn)
write(joinpath(dn, "TestPkg718.jl"), """
module TestPkg718
module TestModule718
export _VARIABLE_UNASSIGNED
#=global=# _VARIABLE_UNASSIGNED = -84.0
end
using .TestModule718
end
""")
sleep(mtimedelay)
@eval using TestPkg718
sleep(mtimedelay)
@test TestPkg718._VARIABLE_UNASSIGNED == -84.0
write(joinpath(dn, "TestPkg718.jl"), """
module TestPkg718
module TestModule718
export _VARIABLE_UNASSIGNED
#=global=# _VARIABLE_UNASSIGNED = -83.0
end
using .TestModule718
end
""")
yry()
@test TestPkg718._VARIABLE_UNASSIGNED == -83.0

rm_precompile("TestPkg718")
pop!(LOAD_PATH)
end

do_test("Timing (issue #341)") && @testset "Timing (issue #341)" begin
testdir = newtestdir()
dn = joinpath(testdir, "Timing", "src")
Expand Down

0 comments on commit dcee3ec

Please sign in to comment.