diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-07 15:21:06 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-07 15:21:06 +0000 |
commit | 1edaa8ac6a8a0bedd19cba3a89f2529e7039a002 (patch) | |
tree | c1171ef3a62ee8ee2a31ca0302ddf9ddeea72693 /test | |
parent | 7e5cb466d115414459f9ab714d82c6c3345f71dd (diff) | |
download | ruby-1edaa8ac6a8a0bedd19cba3a89f2529e7039a002.tar.gz |
Add test for word boundary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_regexp.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 1bc2d0a79f..1104647730 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -77,6 +77,11 @@ class TestRegexp < Test::Unit::TestCase end end + def test_word_boundary + assert_match(/\u3042\b /, "\u3042 ") + assert_not_match(/\u3042\ba/, "\u3042a") + end + def test_named_capture m = /&(?<foo>.*?);/.match("aaa & yyy") assert_equal("amp", m["foo"]) |