Skip to content

Commit a5e2ae8

Browse files
committed
Disable test for invalid ASCII input on Windows
1 parent 263776a commit a5e2ae8

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/runtests.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@ catch err
5353
"iconv error: byte sequence 0xc3a9e282ac is invalid in source encoding or cannot be represented in target encoding"
5454
end
5555

56-
@test_throws ErrorException decode("qwertyé€".data, "ASCII")
57-
try
58-
decode("qwertyé€".data, "ASCII")
59-
catch err
60-
io = IOBuffer()
61-
showerror(io, err)
62-
@test takebuf_string(io) ==
63-
"iconv error: byte sequence 0xc3a9e282ac is invalid in source encoding or cannot be represented in target encoding"
56+
# win_iconv currently does not throw an error on bytes >= 0x80 in ASCII sources
57+
# https://github.com/win-iconv/win-iconv/pull/26
58+
if OS_NAME != :Windows
59+
@test_throws ErrorException decode("qwertyé€".data, "ASCII")
60+
try
61+
decode("qwertyé€".data, "ASCII")
62+
catch err
63+
io = IOBuffer()
64+
showerror(io, err)
65+
@test takebuf_string(io) ==
66+
"iconv error: byte sequence 0xc3a9e282ac is invalid in source encoding or cannot be represented in target encoding"
67+
end
6468
end
6569

6670
mktemp() do p, io

0 commit comments

Comments
 (0)