A few more deprecations still
This commit is contained in:
parent
9fc6092aa5
commit
ab261170ef
@ -268,7 +268,7 @@ function interactive(
|
|||||||
if default_config_file == nothing
|
if default_config_file == nothing
|
||||||
print("[None]: ")
|
print("[None]: ")
|
||||||
else
|
else
|
||||||
print("[$(replace(default_config_file, homedir(), "~"))]: ")
|
print("[$(replace(default_config_file, homedir() => "~"))]: ")
|
||||||
end
|
end
|
||||||
config_file = readline()
|
config_file = readline()
|
||||||
config_file = if uppercase(config_file) == "NONE"
|
config_file = if uppercase(config_file) == "NONE"
|
||||||
|
@ -31,7 +31,6 @@ function gen_plugin(
|
|||||||
assets_string *= """$(tab^2)"assets/$(basename(asset))",\n"""
|
assets_string *= """$(tab^2)"assets/$(basename(asset))",\n"""
|
||||||
end
|
end
|
||||||
assets_string *= "$tab]"
|
assets_string *= "$tab]"
|
||||||
|
|
||||||
else
|
else
|
||||||
assets_string = "[]"
|
assets_string = "[]"
|
||||||
end
|
end
|
||||||
@ -71,7 +70,7 @@ function show(io::IO, p::Documenter)
|
|||||||
if n == 0
|
if n == 0
|
||||||
println(io)
|
println(io)
|
||||||
else
|
else
|
||||||
println(io, ": $(join(map(a -> replace(a, homedir(), "~"), p.assets), ", "))")
|
println(io, ": $(join(map(a -> replace(a, homedir() => "~"), p.assets), ", "))")
|
||||||
end
|
end
|
||||||
|
|
||||||
n = length(p.gitignore)
|
n = length(p.gitignore)
|
||||||
|
@ -37,13 +37,13 @@ pkg_dir = joinpath(temp_dir, test_pkg)
|
|||||||
p = GitHubPages(; assets=[test_file])
|
p = GitHubPages(; assets=[test_file])
|
||||||
@test gen_plugin(p, t, temp_dir, test_pkg) == ["docs/"]
|
@test gen_plugin(p, t, temp_dir, test_pkg) == ["docs/"]
|
||||||
make = readchomp(joinpath(pkg_dir, "docs", "make.jl"))
|
make = readchomp(joinpath(pkg_dir, "docs", "make.jl"))
|
||||||
@test contains(
|
@test occursin(
|
||||||
make,
|
|
||||||
strip("""
|
strip("""
|
||||||
assets=[
|
assets=[
|
||||||
"assets/$(basename(test_file))",
|
"assets/$(basename(test_file))",
|
||||||
]
|
]
|
||||||
"""),
|
"""),
|
||||||
|
make,
|
||||||
)
|
)
|
||||||
@test isfile(joinpath(pkg_dir, "docs", "src", "assets", basename(test_file)))
|
@test isfile(joinpath(pkg_dir, "docs", "src", "assets", basename(test_file)))
|
||||||
rm(joinpath(pkg_dir, "docs"); recursive=true)
|
rm(joinpath(pkg_dir, "docs"); recursive=true)
|
||||||
|
@ -214,17 +214,20 @@ end
|
|||||||
@test occursin(join(badges(p, t.user, test_pkg), "\n"), readme)
|
@test occursin(join(badges(p, t.user, test_pkg), "\n"), readme)
|
||||||
end
|
end
|
||||||
# Check the order of the badges.
|
# Check the order of the badges.
|
||||||
@test search(readme, "github.io").start <
|
@test something(findfirst("github.io", readme)).start <
|
||||||
search(readme, "travis").start <
|
something(findfirst("travis", readme)).start <
|
||||||
search(readme, "appveyor").start <
|
something(findfirst("appveyor", readme)).start <
|
||||||
search(readme, "codecov").start <
|
something(findfirst("codecov", readme)).start <
|
||||||
search(readme, "coveralls").start
|
something(findfirst("coveralls", readme)).start
|
||||||
# Plugins with badges but not in BADGE_ORDER should appear at the far right side.
|
# Plugins with badges but not in BADGE_ORDER should appear at the far right side.
|
||||||
t.plugins[Foo] = Foo()
|
t.plugins[Foo] = Foo()
|
||||||
gen_readme(temp_dir, test_pkg, t)
|
gen_readme(temp_dir, test_pkg, t)
|
||||||
readme = readchomp(joinpath(pkg_dir, "README.md"))
|
readme = readchomp(joinpath(pkg_dir, "README.md"))
|
||||||
rm(joinpath(pkg_dir, "README.md"))
|
rm(joinpath(pkg_dir, "README.md"))
|
||||||
@test search(readme, "coveralls").start < search(readme, "baz").start
|
@test <(
|
||||||
|
something(findfirst("coveralls", readme)).start,
|
||||||
|
something(findfirst("baz", readme)).start,
|
||||||
|
)
|
||||||
|
|
||||||
@test gen_gitignore(temp_dir, test_pkg, t) == [".gitignore"]
|
@test gen_gitignore(temp_dir, test_pkg, t) == [".gitignore"]
|
||||||
@test isfile(joinpath(pkg_dir, ".gitignore"))
|
@test isfile(joinpath(pkg_dir, ".gitignore"))
|
||||||
|
Loading…
Reference in New Issue
Block a user