testing readme
This commit is contained in:
parent
28c080e7ed
commit
fc46d0a33e
@ -216,7 +216,7 @@ function gen_readme(pkg_dir::AbstractString, t::Template)
|
|||||||
"\n",
|
"\n",
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
if haskey(t.plugins, Citation) && p.plugins[Citation].readme_section
|
if haskey(t.plugins, Citation) && t.plugins[Citation].readme_section
|
||||||
text *= "\n## Citing\n\nSee `CITATION.bib` for the relevant reference(s)\n"
|
text *= "\n## Citing\n\nSee `CITATION.bib` for the relevant reference(s)\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -24,6 +24,16 @@ pkg_dir = joinpath(t.dir, test_pkg)
|
|||||||
@test occursin("$(t.authors)", citation)
|
@test occursin("$(t.authors)", citation)
|
||||||
@test occursin("v0.0.1", citation)
|
@test occursin("v0.0.1", citation)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@testset "Readme modification" begin
|
||||||
|
p = Citation(; readme_section=true)
|
||||||
|
t.plugins[Citation] = p
|
||||||
|
isdir(pkg_dir) && rm(pkg_dir; recursive=true)
|
||||||
|
generate(test_pkg, t, git=false)
|
||||||
|
readme = read(joinpath(pkg_dir, "README.md"), String)
|
||||||
|
@test occursin("## Citing", readme)
|
||||||
|
@test occursin("CITATION.bib", readme)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
rm(pkg_dir; recursive=true)
|
rm(pkg_dir; recursive=true)
|
||||||
|
Loading…
Reference in New Issue
Block a user