aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_utf16.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_utf16.rb')
-rw-r--r--test/ruby/test_utf16.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_utf16.rb b/test/ruby/test_utf16.rb
index 05236348d6..654818fbc8 100644
--- a/test/ruby/test_utf16.rb
+++ b/test/ruby/test_utf16.rb
@@ -176,6 +176,14 @@ EOT
assert_str_equal(s, s.chomp, "#{encdump s}.chomp")
end
+ def test_succ
+ s = "\xff\xff".force_encoding("utf-16be")
+ assert(s.succ.valid_encoding?, "#{encdump s}.succ.valid_encoding?")
+
+ s = "\xdb\xff\xdf\xff".force_encoding("utf-16be")
+ assert(s.succ.valid_encoding?, "#{encdump s}.succ.valid_encoding?")
+ end
+
def test_regexp_union
enccall(Regexp, :union, "aa".force_encoding("utf-16be"), "bb".force_encoding("utf-16be"))
end