Skip to content

Commit 03039d3

Browse files
committed
test: fix lineendings in tests on Windows
1 parent 99b3a7e commit 03039d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/documentertools.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import MultiDocumenter: DocumenterTools
33

44
FIXTURES = joinpath(@__DIR__, "fixtures")
55

6+
normalize_newlines(s::AbstractString) = replace(s, "\r\n" => "\n")
7+
68
@testset "walkdocs" begin
79
let fileinfos = DocumenterTools.FileInfo[]
810
rs = DocumenterTools.walkdocs(joinpath(FIXTURES, "pre")) do fileinfo
@@ -123,8 +125,8 @@ end
123125
canonical = "https://example.org/this-is-test",
124126
)
125127
DocumenterTools.walkdocs(joinpath(FIXTURES, "post")) do fileinfo
126-
post = read(fileinfo.fullpath, String)
127-
changed = read(joinpath(out, fileinfo.relpath), String)
128+
post = normalize_newlines(read(fileinfo.fullpath, String))
129+
changed = normalize_newlines(read(joinpath(out, fileinfo.relpath), String))
128130
if changed != post
129131
@error "update_canonical_links: change and post not matching" out fileinfo
130132
end

0 commit comments

Comments
 (0)