summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-13 17:16:03 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-13 17:16:03 +0000
commit759c6d2a89a955d43694a98a47b12cde2e26d14c (patch)
tree047abeb67bb5171771b46bff4d9b2a5affb48204
parent1951ceeed731938663b85939b7b9c7002ad4e34b (diff)
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_utf16.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_utf16.rb b/test/ruby/test_utf16.rb
index 74df84a..d26cdc0 100644
--- a/test/ruby/test_utf16.rb
+++ b/test/ruby/test_utf16.rb
@@ -262,6 +262,10 @@ EOT
"Regexp.new(#{encdump s}).encoding")
end
+ def test_regexp_match
+ assert_raise(ArgumentError) { Regexp.new("aa".force_encoding("utf-16be")) =~ "aa" }
+ end
+
def test_gsub
s = "abcd".force_encoding("utf-16be")
assert_nothing_raised {