diff options
-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"]) |