harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r540263 - /harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
Date Mon, 21 May 2007 20:18:31 GMT
Author: ayza
Date: Mon May 21 13:18:31 2007
New Revision: 540263

URL: http://svn.apache.org/viewvc?view=rev&rev=540263
Log:
New test for testing \s class was added. Inspired by HARMONY-3360.

Modified:
    harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java?view=diff&rev=540263&r1=540262&r2=540263
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
Mon May 21 13:18:31 2007
@@ -687,10 +687,21 @@
     public void testPatternMatcher() throws Exception {
         Pattern pattern = Pattern.compile("(?:\\d+)(?:pt)");
         assertTrue(pattern.matcher("14pt").matches());
-    } 
+    }
 
+    /**
+     * Inspired by HARMONY-3360
+     */
+    public void test3360() {
+        String str = "!\"#%&'(),-./";
+        Pattern p = Pattern.compile("\\s");
+        Matcher m = p.matcher(str);
 
-	public static void main(String[] args) {
+        assertFalse(m.find());
+    }
+
+
+    public static void main(String[] args) {
 		junit.textui.TestRunner.run(MatcherTest.class);
 	}
 }



Mime
View raw message