Add more git tests
This commit is contained in:
parent
3ecb8442ff
commit
b82050cd0f
@ -43,6 +43,13 @@
|
||||
@test !t.manifest
|
||||
@test isempty(t.plugins)
|
||||
println()
|
||||
|
||||
# Host and SSH aren't prompted for when git is disabled.
|
||||
write(stdin.buffer, "$me\n\n\r\n\nd")
|
||||
t = interactive_template(; git=false)
|
||||
@test t.host == "github.com"
|
||||
@test !t.ssh
|
||||
println()
|
||||
end
|
||||
|
||||
@testset "Package generation" begin
|
||||
|
@ -27,14 +27,14 @@ const test_file = tempname()
|
||||
const default_dir = Pkg.devdir()
|
||||
const gitconfig = GitConfig(joinpath(@__DIR__, "gitconfig"))
|
||||
const template_text = """
|
||||
PKGNAME: {{PKGNAME}}
|
||||
VERSION: {{VERSION}}}
|
||||
{{#DOCUMENTER}}Documenter{{/DOCUMENTER}}
|
||||
{{#CODECOV}}Codecov{{/CODECOV}}
|
||||
{{#COVERALLS}}Coveralls{{/COVERALLS}}
|
||||
{{#AFTER}}After{{/AFTER}}
|
||||
{{#OTHER}}Other{{/OTHER}}
|
||||
"""
|
||||
PKGNAME: {{PKGNAME}}
|
||||
VERSION: {{VERSION}}}
|
||||
{{#DOCUMENTER}}Documenter{{/DOCUMENTER}}
|
||||
{{#CODECOV}}Codecov{{/CODECOV}}
|
||||
{{#COVERALLS}}Coveralls{{/COVERALLS}}
|
||||
{{#AFTER}}After{{/AFTER}}
|
||||
{{#OTHER}}Other{{/OTHER}}
|
||||
"""
|
||||
write(test_file, template_text)
|
||||
|
||||
@testset "Template creation" begin
|
||||
@ -331,6 +331,12 @@ end
|
||||
rm(temp_dir; recursive=true)
|
||||
end
|
||||
|
||||
@testset "Git-less template creation" begin
|
||||
if isempty(LibGit2.getconfig("user.name", ""))
|
||||
@test_nowarn Template(; user=me, git=false)
|
||||
end
|
||||
end
|
||||
|
||||
@testset "Git-less package generation" begin
|
||||
t = Template(; user=me)
|
||||
generate(test_pkg, t; git=false)
|
||||
|
Loading…
Reference in New Issue
Block a user