[Schmitzm-commits] r1991 - in trunk/schmitzm-adresses/src: main/java/de/schmitzm/adresses test/java/de/schmitzm/adresses

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Fri May 11 01:10:18 CEST 2012


Author: alfonx
Date: 2012-05-11 01:10:18 +0200 (Fri, 11 May 2012)
New Revision: 1991

Modified:
   trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java
   trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java
Log:
Es lebe oadr_ort! Nur noch 32 failed!

Modified: trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java
===================================================================
--- trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java	2012-05-10 21:42:06 UTC (rev 1990)
+++ trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java	2012-05-10 23:10:18 UTC (rev 1991)
@@ -510,7 +510,7 @@
 
 		ort = ort.replaceAll("\\bbezirk\\b", "");
 		ort = ort.replaceAll("\\bgebiet\\b", "");
-		ort = ort.replaceAll("\\bmarkt$", "");
+		ort = ort.replaceAll(".\\bmarkt$", "");
 		ort = ort.replaceAll("\\bgkst\\b", "");
 		ort = ort.replaceAll("\\b(markt|)flecken$", "");
 

Modified: trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java
===================================================================
--- trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java	2012-05-10 21:42:06 UTC (rev 1990)
+++ trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java	2012-05-10 23:10:18 UTC (rev 1991)
@@ -295,6 +295,9 @@
 		assertEquals("hamburg", AddrStringUtil.normalizeOrt("Hamburg, Hansestadt"));
 		
 		assertEquals("bergenxxruegen", AddrStringUtil.normalizeOrt("Bergen auf Rügen"));
+		assertEquals("marktscheuren", AddrStringUtil.normalizeOrt("Markt Scheuren"));
+		assertEquals("markt", AddrStringUtil.normalizeOrt("Markt"));
+		assertEquals("berbu", AddrStringUtil.normalizeOrt("Berbu Markt"));
 		
 		
 	}



More information about the Schmitzm-commits mailing list