[Schmitzm-commits] r2242 - trunk/schmitzm-core/src/test/java/de/schmitzm/regex

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat Feb 23 17:09:47 CET 2013


Author: alfonx
Date: 2013-02-23 17:09:47 +0100 (Sat, 23 Feb 2013)
New Revision: 2242

Modified:
   trunk/schmitzm-core/src/test/java/de/schmitzm/regex/RegexCacheTest.java
Log:


Modified: trunk/schmitzm-core/src/test/java/de/schmitzm/regex/RegexCacheTest.java
===================================================================
--- trunk/schmitzm-core/src/test/java/de/schmitzm/regex/RegexCacheTest.java	2013-02-23 16:07:56 UTC (rev 2241)
+++ trunk/schmitzm-core/src/test/java/de/schmitzm/regex/RegexCacheTest.java	2013-02-23 16:09:47 UTC (rev 2242)
@@ -17,4 +17,13 @@
 		assertTrue(rC.looksLikeRegex("Gastst.tte"));
 		assertFalse(rC.looksLikeRegex("asd"));
 	}
+
+	@Test
+	public void testMatches() {
+		RegexCache rC = RegexCache.getInstance();
+
+		assertTrue(rC.matches("[sd]h", "asdasdh asdsa"));
+		assertFalse(rC.matches("[sd]h", "asdasd asdsa"));
+		assertTrue(rC.matches("\\basdsa", "asdasd asdsa"));
+	}
 }



More information about the Schmitzm-commits mailing list