Wrap package and generated tests in a test set
This commit is contained in:
parent
46066fd563
commit
545a4c5688
@ -208,8 +208,10 @@ function gen_tests(dir::AbstractString, pkg_name::AbstractString, template::Temp
|
|||||||
using $pkg_name
|
using $pkg_name
|
||||||
using Base.Test
|
using Base.Test
|
||||||
|
|
||||||
# Write your own tests here.
|
@testset "$pkg_name.jl" begin
|
||||||
@test 1 == 2
|
# Write your own tests here.
|
||||||
|
@test 1 == 2
|
||||||
|
end
|
||||||
"""
|
"""
|
||||||
|
|
||||||
gen_file(joinpath(dir, pkg_name, "test", "runtests.jl"), text)
|
gen_file(joinpath(dir, pkg_name, "test", "runtests.jl"), text)
|
||||||
|
@ -10,7 +10,9 @@ mktempdir() do temp_dir
|
|||||||
withenv("JULIA_PKGDIR" => temp_dir) do
|
withenv("JULIA_PKGDIR" => temp_dir) do
|
||||||
Pkg.init()
|
Pkg.init()
|
||||||
cd(temp_dir) do
|
cd(temp_dir) do
|
||||||
include("tests.jl")
|
@testset "PkgTemplates.jl" begin
|
||||||
|
include("tests.jl")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user