diff --git a/test/runtests.jl b/test/runtests.jl index ca2ea07..74d7d40 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -26,6 +26,7 @@ using Arxiv: @arXiv_str # hosted on GitLab using GPMaxlik: gnll # hosted on sourcehut function url_exists(url) + url = replace(url, r"#.*$" => "") # strip line number response = request("GET", url; status_exception=false, redirect=true, retry=true) if 200 ≤ response.status < 400 return true @@ -75,22 +76,24 @@ end @testset "Base" begin m = @which sqrt(0.0) u = first(@inferred url(m)) - # @test url_exists(u) + @test url_exists(u) end @testset "Stdlib" begin @testset "within julialang/julia" begin m = @which @test true u = first(@inferred url(m)) - # @test url_exists(u) + @test url_exists(u) m = @which det(rand(2, 2)) u = first(@inferred url(m)) - # @test url_exists(u) + @test url_exists(u) end - @testset "own repository" begin + @testset "standalone repository" begin m = @which mean(rand(5)) u = first(@inferred url(m)) - # @test url_exists(u) + if VERSION >= v"1.11" # no tag for Statistics.jl v1.10.0 + @test url_exists(u) + end end end @@ -98,28 +101,28 @@ end @testset "GitHub" begin m = @which Aqua.test_all(MethodURL) u = first(@inferred url(m)) - # @test url_exists(u) - end - @testset "GitHub monorepo" begin - m = first(methods(Plots.RecipesBase.create_kw_body)) - u = first(@inferred url(m)) - # @test url_exists(u) + @test url_exists(u) end + # @testset "GitHub monorepo" begin + # m = first(methods(Plots.RecipesBase.create_kw_body)) + # u = first(@inferred url(m)) + # @test url_exists(u) + # end @testset "GitLab" begin m = @which arXiv"1234.5678" u = first(@inferred url(m)) - # @test url_exists(u) # no tags in Arxiv.jl + @test_broken url_exists(u) # no tags in Arxiv.jl end @testset "Sourcehut" begin m = first(methods(gnll)) u = first(@inferred url(m)) - # @test url_exists(u) # no tags in GPMaxlik.jl + @test_broken url_exists(u) # no tags in GPMaxlik.jl end end # @testset "Local" begin # m = @which url(@which sqrt(1.0)) # u = first(@inferred url(m)) - # # @test url_exists(u) + # @test_broken url_exists(u) # end end end