summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-30 09:04:51 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-30 09:04:51 +0000
commit11d50a255f4209610861d12d094cbd3d6744a492 (patch)
treecf774b669af4c80aa959c7457c87c0ff67972ee3 /test
parented5eaaf71fd91988f21d305d4f934d511125635c (diff)
downloadruby-11d50a255f4209610861d12d094cbd3d6744a492.tar.gz
ruby-11d50a255f4209610861d12d094cbd3d6744a492.tar.xz
ruby-11d50a255f4209610861d12d094cbd3d6744a492.zip
* test/ruby/test_regexp.rb (TestRegexp#test_parse_curly_brace):
now accepts quantifier on anchrs agian by r20391. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_regexp.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index fdfef04b4..d6441c957 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -604,11 +604,13 @@ class TestRegexp < Test::Unit::TestCase
check(/\Aa{0}+\z/, "", %w(a aa aab))
check(/\Aa{1}+\z/, %w(a aa), ["", "aab"])
check(/\Aa{1,2}b{1,2}\z/, %w(ab aab abb aabb), ["", "aaabb", "abbb"])
+ check(/(?!x){0,1}/, [ ['', 'ab'], ['', ''] ])
+ check(/c\z{0,1}/, [ ['c', 'abc'], ['c', 'cab']], ['abd'])
+ check(/\A{0,1}a/, [ ['a', 'abc'], ['a', '____abc']], ['bcd'])
failcheck('.{100001}')
failcheck('.{0,100001}')
failcheck('.{1,0}')
failcheck('{0}')
- failcheck('(?!x){0,1}')
end
def test_parse_comment