Skip to content

Commit 5ae751a

Browse files
committed
fix test
1 parent bb7a01e commit 5ae751a

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

test/runtests.jl

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ MultiDocumenter.make(
132132

133133

134134
@testset "custom scripts" begin
135-
index = read(joinpath(outpath, "inf", "stable", "index.html"), String)
136-
135+
index = read(joinpath(outpath, "inf", "v1.6.4", "index.html"), String)
137136
@test occursin(
138137
"""<script charset="utf-8" type="text/javascript">window.MULTIDOCUMENTER_ROOT_PATH = '$rootpath'</script>""",
139138
index,
@@ -150,6 +149,27 @@ MultiDocumenter.make(
150149
"""<script charset="utf-8" type="text/javascript">const foo = 'bar';</script>""",
151150
index,
152151
)
152+
153+
if !Sys.iswindows()
154+
# Going through symlinks does not work on Windows
155+
index = read(joinpath(outpath, "inf", "stable", "index.html"), String)
156+
@test occursin(
157+
"""<script charset="utf-8" type="text/javascript">window.MULTIDOCUMENTER_ROOT_PATH = '$rootpath'</script>""",
158+
index,
159+
)
160+
@test occursin(
161+
"""<script charset="utf-8" src="../../foo/bar.js" type="text/javascript"></script>""",
162+
index,
163+
)
164+
@test occursin(
165+
"""<script charset="utf-8" src="https://foo.com/bar.js" type="text/javascript"></script>""",
166+
index,
167+
)
168+
@test occursin(
169+
"""<script charset="utf-8" type="text/javascript">const foo = 'bar';</script>""",
170+
index,
171+
)
172+
end
153173
end
154174

155175
@testset "canonical URLs" begin

0 commit comments

Comments
 (0)