Skip to content

Commit 61554e8

Browse files
committed
Test AbstractString StringEncoder method
1 parent 0b31cf1 commit 61554e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/runtests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,22 @@ end
114114
@test_throws InvalidEncodingError p = StringDecoder(IOBuffer(), "nonexistent_encoding")
115115

116116
try
117-
p = StringEncoder(IOBuffer(), "nonexistent_encoding")
117+
p = StringEncoder(IOBuffer(), "nonexistent_encoding", "absurd_encoding")
118118
catch err
119119
@test isa(err, InvalidEncodingError)
120120
io = IOBuffer()
121121
showerror(io, err)
122122
@test takebuf_string(io) ==
123-
"Conversion from UTF-8 to nonexistent_encoding not supported by iconv implementation, check that specified encodings are correct"
123+
"Conversion from absurd_encoding to nonexistent_encoding not supported by iconv implementation, check that specified encodings are correct"
124124
end
125125
try
126-
p = StringDecoder(IOBuffer(), "nonexistent_encoding")
126+
p = StringDecoder(IOBuffer(), "nonexistent_encoding", "absurd_encoding")
127127
catch err
128128
@test isa(err, InvalidEncodingError)
129129
io = IOBuffer()
130130
showerror(io, err)
131131
@test takebuf_string(io) ==
132-
"Conversion from nonexistent_encoding to UTF-8 not supported by iconv implementation, check that specified encodings are correct"
132+
"Conversion from nonexistent_encoding to absurd_encoding not supported by iconv implementation, check that specified encodings are correct"
133133
end
134134

135135
mktemp() do path, io

0 commit comments

Comments
 (0)