Ticket #17691: 17691_v2.patch
File 17691_v2.patch, 1.5 KB (added by , 5 years ago) |
---|
-
src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
244 244 String part = ""; 245 245 for (int i = 0; i < words.length; i++) { 246 246 String word = words[i]; 247 part = name.substring(start, start + word.length()); 247 if (start + word.length() <= name.length()) { 248 part = name.substring(start, start + word.length()); 249 } 248 250 if (word.equalsIgnoreCase(part)) { 249 251 break; 250 252 } -
test/unit/org/openstreetmap/josm/data/validation/tests/SimilarNamedWaysTest.java
129 129 checkSimilarity("case only", "Rua Sao Joao", "Rua SAO JOAO", true); 130 130 checkSimilarity("case only", "Rue éèçàïù", "Rue EeCAIU", true); 131 131 } 132 133 /** 134 * Test names that previously caused a crash 135 */ 136 @Test 137 public void testSimilarNamesRegression() { 138 assertFalse(test.similaryName("Unnecessary Name", "Third")); 139 } 132 140 }