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 end
function interactive(plugin_type::Type{<:Documenter}) 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) []: ") print("$t: Enter any Documenter asset files (separated by spaces) []: ")
return plugin_type(; assets=String.(split(readline()))) return plugin_type(; assets=String.(split(readline())))
end end

View File

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

View File

@ -50,13 +50,13 @@ pkg_dir = joinpath(temp_dir, test_pkg)
p = GitLabCI() p = GitLabCI()
@test gen_plugin(p, t, temp_dir, test_pkg) == [".gitlab-ci.yml"] @test gen_plugin(p, t, temp_dir, test_pkg) == [".gitlab-ci.yml"]
@test isfile(joinpath(pkg_dir, ".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, "test_template")
@test contains(gitlab, "using Coverage") @test contains(gitlab, "using Coverage")
rm(joinpath(pkg_dir, ".gitlab-ci.yml")) rm(joinpath(pkg_dir, ".gitlab-ci.yml"))
p = GitLabCI(; coverage=false) p = GitLabCI(; coverage=false)
gen_plugin(p, t, temp_dir, test_pkg) 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") @test !contains(gitlab, "using Coverage")
rm(joinpath(pkg_dir, ".gitlab-ci.yml")) rm(joinpath(pkg_dir, ".gitlab-ci.yml"))
p = GitLabCI(; config_file=nothing) p = GitLabCI(; config_file=nothing)

View File

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

View File

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