aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_transcode.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb
index 957d852c19..9edf30882b 100644
--- a/test/ruby/test_transcode.rb
+++ b/test/ruby/test_transcode.rb
@@ -19,8 +19,6 @@ class TestTranscode < Test::Unit::TestCase
end
def test_errors
- # we don't have semantics for conversion without attribute yet
- # maybe 'convert to UTF-8' would be nice :-)
assert_raise(ArgumentError) { 'abc'.encode }
assert_raise(ArgumentError) { 'abc'.encode! }
assert_raise(ArgumentError) { 'abc'.encode('foo', 'bar') }
@@ -241,4 +239,9 @@ class TestTranscode < Test::Unit::TestCase
check_utf_32_both_ways("\u{8FF00}", "\x00\x08\xFF\x00")
check_utf_32_both_ways("\u{F00FF}", "\x00\x0F\x00\xFF")
end
+
+ def test_invalid_ignore
+ # arguments only
+ 'abc'.encode('utf-8', invalid: :ignore)
+ end
end