Skip to content

Commit b5ff4d5

Browse files
Add regression test that all imports keep being explicit.
1 parent 118c0f0 commit b5ff4d5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/runtests.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
import RegistryTools
22
using Test: @testset, @test
3+
import Pkg
34

45
@testset "RegistryTools" begin
56

67
include("regedit.jl")
78
include("compress.jl")
89

10+
# ExplicitImports does not support as old Julia versions as RegistryTools does.
11+
# Change this to a regular test dependency when it becomes possible, i.e.
12+
# when pre-1.7 support is dropped.
13+
if VERSION >= v"1.7"
14+
Pkg.add(name = "ExplicitImports", uuid = "7d51a73a-1435-4ff3-83d9-f097790105c7", preserve=Pkg.PRESERVE_ALL)
15+
using ExplicitImports: check_no_implicit_imports, check_no_stale_explicit_imports
16+
@testset "ExplicitImports" begin
17+
@test isnothing(check_no_implicit_imports(RegistryTools))
18+
@test isnothing(check_no_stale_explicit_imports(RegistryTools))
19+
end
20+
end
21+
922
end

0 commit comments

Comments
 (0)