test/test_match.rb in modalsupport-0.7.0 vs test/test_match.rb in modalsupport-0.7.1
- old
+ new
@@ -25,6 +25,17 @@
assert_equal ["axa", "aya", "aza"], /a.a/.match_all("xxx axa yue asx aya aza"){|match| match.to_s}
end
end
+ context "Using the stdlib match method" do
+
+ should "not be altered by this library" do
+ /a(x+)b/.match("axxxb")
+ assert_equal "xxx", $1
+ "axxxxb".match(/a(x+)b/)
+ assert_equal "xxxx", $1
+ end
+
+ end
+
end
\ No newline at end of file