More deprecations, mostly readstring

This commit is contained in:
Chris de Graaf 2018-09-19 14:25:09 -05:00
parent e29a6b9d31
commit 3a2f3fcb71
5 changed files with 11 additions and 11 deletions

View File

@ -81,7 +81,7 @@ function show(io::IO, p::Documenter)
end
function interactive(plugin_type::Type{<:Documenter})
t = Base.datatype_name(plugin_type)
t = nameof(plugin_type)
print("$t: Enter any Documenter asset files (separated by spaces) []: ")
return plugin_type(; assets=String.(split(readline())))
end

View File

@ -33,7 +33,7 @@ pkg_dir = joinpath(temp_dir, test_pkg)
p = AppVeyor()
@test gen_plugin(p, t, temp_dir, test_pkg) == [".appveyor.yml"]
@test isfile(joinpath(pkg_dir, ".appveyor.yml"))
appveyor = readstring(joinpath(pkg_dir, ".appveyor.yml"))
appveyor = read(joinpath(pkg_dir, ".appveyor.yml"), String)
@test !contains(appveyor, "coverage=true")
@test !contains(appveyor, "after_test")
@test !contains(appveyor, "Codecov.submit")
@ -42,7 +42,7 @@ pkg_dir = joinpath(temp_dir, test_pkg)
t.plugins[CodeCov] = CodeCov()
gen_plugin(p, t, temp_dir, test_pkg)
delete!(t.plugins, CodeCov)
appveyor = readstring(joinpath(pkg_dir, ".appveyor.yml"))
appveyor = read(joinpath(pkg_dir, ".appveyor.yml"), String)
@test contains(appveyor, "coverage=true")
@test contains(appveyor, "after_test")
@test contains(appveyor, "Codecov.submit")
@ -51,7 +51,7 @@ pkg_dir = joinpath(temp_dir, test_pkg)
t.plugins[Coveralls] = Coveralls()
gen_plugin(p, t, temp_dir, test_pkg)
delete!(t.plugins, Coveralls)
appveyor = readstring(joinpath(pkg_dir, ".appveyor.yml"))
appveyor = read(joinpath(pkg_dir, ".appveyor.yml"), String)
@test contains(appveyor, "coverage=true")
@test contains(appveyor, "after_test")
@test contains(appveyor, "Coveralls.submit")

View File

@ -50,13 +50,13 @@ pkg_dir = joinpath(temp_dir, test_pkg)
p = GitLabCI()
@test gen_plugin(p, t, temp_dir, test_pkg) == [".gitlab-ci.yml"]
@test isfile(joinpath(pkg_dir, ".gitlab-ci.yml"))
gitlab = readstring(joinpath(pkg_dir, ".gitlab-ci.yml"))
gitlab = read(joinpath(pkg_dir, ".gitlab-ci.yml"), String)
@test contains(gitlab, "test_template")
@test contains(gitlab, "using Coverage")
rm(joinpath(pkg_dir, ".gitlab-ci.yml"))
p = GitLabCI(; coverage=false)
gen_plugin(p, t, temp_dir, test_pkg)
gitlab = readstring(joinpath(pkg_dir, ".gitlab-ci.yml"))
gitlab = read(joinpath(pkg_dir, ".gitlab-ci.yml"), String)
@test !contains(gitlab, "using Coverage")
rm(joinpath(pkg_dir, ".gitlab-ci.yml"))
p = GitLabCI(; config_file=nothing)

View File

@ -33,7 +33,7 @@ pkg_dir = joinpath(temp_dir, test_pkg)
p = TravisCI()
@test gen_plugin(p, t, temp_dir, test_pkg) == [".travis.yml"]
@test isfile(joinpath(pkg_dir, ".travis.yml"))
travis = readstring(joinpath(pkg_dir, ".travis.yml"))
travis = read(joinpath(pkg_dir, ".travis.yml"), String)
@test !contains(travis, "after_success")
@test !contains(travis, "Codecov.submit")
@test !contains(travis, "Coveralls.submit")
@ -42,7 +42,7 @@ pkg_dir = joinpath(temp_dir, test_pkg)
t.plugins[CodeCov] = CodeCov()
gen_plugin(p, t, temp_dir, test_pkg)
delete!(t.plugins, CodeCov)
travis = readstring(joinpath(pkg_dir, ".travis.yml"))
travis = read(joinpath(pkg_dir, ".travis.yml"), String)
@test contains(travis, "after_success")
@test contains(travis, "Codecov.submit")
@test !contains(travis, "Coveralls.submit")
@ -51,7 +51,7 @@ pkg_dir = joinpath(temp_dir, test_pkg)
t.plugins[Coveralls] = Coveralls()
gen_plugin(p, t, temp_dir, test_pkg)
delete!(t.plugins, Coveralls)
travis = readstring(joinpath(pkg_dir, ".travis.yml"))
travis = read(joinpath(pkg_dir, ".travis.yml"), String)
@test contains(travis, "after_success")
@test contains(travis, "Coveralls.submit")
@test !contains(travis, "Codecov.submit")
@ -60,7 +60,7 @@ pkg_dir = joinpath(temp_dir, test_pkg)
t.plugins[GitHubPages] = GitHubPages()
gen_plugin(p, t, temp_dir, test_pkg)
delete!(t.plugins, GitHubPages)
travis = readstring(joinpath(pkg_dir, ".travis.yml"))
travis = read(joinpath(pkg_dir, ".travis.yml"), String)
@test contains(travis, "after_success")
@test contains(travis, "Pkg.add(\"Documenter\")")
@test !contains(travis, "Codecov.submit")

View File

@ -424,7 +424,7 @@ end
end
@testset "License display" begin
old_stdout = STDOUT
old_stdout = stdout
out_read, out_write = redirect_stdout()
available_licenses()
licenses = String(readavailable(out_read))