diff options
Diffstat (limited to 'test/ruby/enc/test_utf16.rb')
-rw-r--r-- | test/ruby/enc/test_utf16.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/enc/test_utf16.rb b/test/ruby/enc/test_utf16.rb index a7c735f436..7f807476aa 100644 --- a/test/ruby/enc/test_utf16.rb +++ b/test/ruby/enc/test_utf16.rb @@ -355,4 +355,10 @@ EOT assert_equal("", sl.chop) assert_equal("", sb.chop) end + + def test_regexp_escape + s = "\0*".force_encoding("UTF-16BE") + r = Regexp.new(Regexp.escape(s)) + assert(r =~ s) + end end |