diff --git a/test/REQUIRE b/test/REQUIRE new file mode 100644 index 0000000..df4c428 --- /dev/null +++ b/test/REQUIRE @@ -0,0 +1 @@ +Compat 0.41.0 diff --git a/test/runtests.jl b/test/runtests.jl index ff2c63b..1746f8b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,5 @@ -using Base.Test +using Compat +using Compat.Test module X1 using Reexport @@ -17,7 +18,12 @@ module Y2 end module X2 using Reexport - @reexport using Y2 + @static if VERSION >= v"0.7.0-" + # Locally defined modules require a dot prefix in 0.7 + @reexport using .Y2 + else + @reexport using Y2 + end end @test union!(Set(), names(X2)) == union!(Set(), [:X2, :Y2, :Z2]) @test X2.Z2 == 2 @@ -40,7 +46,12 @@ end module X4 using Reexport - @reexport importall Y2 + @static if VERSION >= v"0.7.0-" + # importall is deprecated in 0.7 + @reexport using .Y2 + else + @reexport importall Y2 + end end @test union!(Set(), names(X4)) == union!(Set(), [:X4, :Y2, :Z2]) @test X4.Z2 == 2 @@ -55,7 +66,11 @@ module X5 const Z4 = 4 export Z4 end - @reexport importall .Y3, .Y4 + @static if VERSION >= v"0.7.0-" + @reexport using .Y3, .Y4 + else + @reexport importall .Y3, .Y4 + end end @test union!(Set(), names(X3)) == union!(Set(), [:X3, :Y3, :Y4, :Z3, :Z4]) @test X3.Z3 == 3