File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 106106@test_throws InvalidEncodingError p = StringEncoder (IOBuffer (), " nonexistent_encoding" )
107107@test_throws InvalidEncodingError p = StringDecoder (IOBuffer (), " nonexistent_encoding" )
108108
109+ try
110+ p = StringEncoder (IOBuffer (), " nonexistent_encoding" )
111+ catch err
112+ @test isa (err, InvalidEncodingError)
113+ io = IOBuffer ()
114+ showerror (io, err)
115+ @test takebuf_string (io) ==
116+ " Conversion from UTF-8 to nonexistent_encoding not supported by iconv implementation, check that specified encodings are correct"
117+ end
118+ try
119+ p = StringDecoder (IOBuffer (), " nonexistent_encoding" )
120+ catch err
121+ @test isa (err, InvalidEncodingError)
122+ io = IOBuffer ()
123+ showerror (io, err)
124+ @test takebuf_string (io) ==
125+ " Conversion from nonexistent_encoding to UTF-8 not supported by iconv implementation, check that specified encodings are correct"
126+ end
127+
109128nothing
You can’t perform that action at this time.
0 commit comments