From 1edaa8ac6a8a0bedd19cba3a89f2529e7039a002 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 7 Jan 2012 15:21:06 +0000 Subject: Add test for word boundary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_regexp.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby/test_regexp.rb') 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 = /&(?.*?);/.match("aaa & yyy") assert_equal("amp", m["foo"]) -- cgit v1.2.3