|
1 | 1 | module RemoteTests |
2 | 2 | using Test |
3 | 3 | using Documenter |
4 | | -using .Remotes: repofile, repourl, issueurl, URL, GitHub, GitLab |
| 4 | +using .Remotes: repofile, repourl, issueurl, URL, GitHub, GitLab, Forgejo |
5 | 5 |
|
6 | 6 | @testset "RepositoryRemote" begin |
7 | 7 | let r = URL("https://github.com/FOO/BAR/blob/{commit}{path}#{line}") |
@@ -95,6 +95,25 @@ using .Remotes: repofile, repourl, issueurl, URL, GitHub, GitLab |
95 | 95 | @test repofile(r, "mybranch", "src/foo.jl", 5:8) == "https://gitlab.com/JuliaDocs/Documenter.jl/-/tree/mybranch/src/foo.jl#L5-L8" |
96 | 96 | @test issueurl(r, "123") == "https://gitlab.com/JuliaDocs/Documenter.jl/-/issues/123" |
97 | 97 | end |
| 98 | + |
| 99 | + # Forgejo remote |
| 100 | + let r = Forgejo("git.mydomain.tld", "JuliaDocs", "Documenter.jl") |
| 101 | + @test repourl(r) == "https://git.mydomain.tld/JuliaDocs/Documenter.jl" |
| 102 | + @test repofile(r, "mybranch", "src/foo.jl") == "https://git.mydomain.tld/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl" |
| 103 | + @test repofile(r, "mybranch", "src/foo.jl", 5) == "https://git.mydomain.tld/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl#L5" |
| 104 | + @test repofile(r, "mybranch", "src/foo.jl", 5:5) == "https://git.mydomain.tld/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl#L5" |
| 105 | + @test repofile(r, "mybranch", "src/foo.jl", 5:8) == "https://git.mydomain.tld/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl#L5-L8" |
| 106 | + @test issueurl(r, "123") == "https://git.mydomain.tld/JuliaDocs/Documenter.jl/issues/123" |
| 107 | + end |
| 108 | + |
| 109 | + let r = Forgejo("codeberg.org/JuliaDocs/Documenter.jl") |
| 110 | + @test repourl(r) == "https://codeberg.org/JuliaDocs/Documenter.jl" |
| 111 | + @test repofile(r, "mybranch", "src/foo.jl") == "https://codeberg.org/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl" |
| 112 | + @test repofile(r, "mybranch", "src/foo.jl", 5) == "https://codeberg.org/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl#L5" |
| 113 | + @test repofile(r, "mybranch", "src/foo.jl", 5:5) == "https://codeberg.org/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl#L5" |
| 114 | + @test repofile(r, "mybranch", "src/foo.jl", 5:8) == "https://codeberg.org/JuliaDocs/Documenter.jl/src/commit/mybranch/src/foo.jl#L5-L8" |
| 115 | + @test issueurl(r, "123") == "https://codeberg.org/JuliaDocs/Documenter.jl/issues/123" |
| 116 | + end |
98 | 117 | end |
99 | 118 |
|
100 | 119 | end # module |
0 commit comments