summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-25 09:02:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-25 09:02:52 +0000
commit01a24da8d31dad0bd15b96a4527dbccb345c6a78 (patch)
treecd137ccc900fd4fc9d4932059aed25eed41f8c62 /sample
parent031d2e84df58ed54948671931544c41cf32da1ca (diff)
990625
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 023ff69d72..a849a42fc2 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -609,6 +609,14 @@ ABCD
ABCD
END
+ok(/^(ab+)+b/ =~ "ababb" && $& == "ababb")
+ok(/^(?:ab+)+b/ =~ "ababb" && $& == "ababb")
+ok(/^(ab+)+/ =~ "ababb" && $& == "ababb")
+ok(/^(?:ab+)+/ =~ "ababb" && $& == "ababb")
+
+ok(/(\s+\d+){2}/ =~ " 1 2" && $& == " 1 2")
+ok(/(?:\s+\d+){2}/ =~ " 1 2" && $& == " 1 2")
+
$x.gsub!(/((.|\n)*?)B((.|\n)*?)D/){$1+$3}
ok($x == "AC\nAC\n")