summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 03:09:13 +0000
committerksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 03:09:13 +0000
commit09542e3269f5b915b45eb5c03fcb8c61452d751e (patch)
tree91eb489927947f75436f5bd366896772c6b0c71c /test/ruby/test_regexp.rb
parent5fb312bd18a09ac50e8c7d707cb87893609ce9fc (diff)
* regparse.c, test/ruby/test_regexp.rb: fixed problem with UTF-8 characters that have U+00FE or invalid characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 889fbb4b2d..dbfe4d7aeb 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -12,4 +12,16 @@ class TestRegexp < Test::Unit::TestCase
def test_ruby_dev_24887
assert_equal("a".gsub(/a\Z/, ""), "")
end
+
+ def test_yoshidam_net_20041111_1
+ s = "[\xC2\xA0-\xC3\xBE]"
+ assert_match(Regexp.new(s, nil, "u"), "\xC3\xBE")
+ end
+
+ def test_yoshidam_net_20041111_2
+ assert_raise(RegexpError) do
+ s = "[\xFF-\xFF]"
+ Regexp.new(s, nil, "u")
+ end
+ end
end