Changeset 11131 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java
r11129 r11131 6 6 7 7 import java.util.HashSet; 8 import java.util.Map.Entry;9 8 import java.util.Set; 10 9 import java.util.regex.Pattern; … … 67 66 Set<String> names = new HashSet<>(); 68 67 69 for (Entry<String, String> entry : p.getKeys().entrySet()) { 70 if (entry.getKey().startsWith("name:")) { 71 String n = entry.getValue(); 68 p.getKeys().forEach((key, n) -> { 69 if (key.startsWith("name:") && !"name:etymology:wikidata".equals(key)) { 72 70 if (n != null) { 73 71 names.add(n); 74 72 } 75 73 } 76 } 74 }); 77 75 78 76 if (names.isEmpty()) return; -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/NameMismatchTest.java
r10945 r11131 77 77 assertEquals(0, errors.size()); 78 78 } 79 80 /** 81 * Test that {@code name:etymology:wikidata} does not count. 82 */ 83 @Test 84 public void testEtymologyWikidata() { 85 final List<TestError> errors = test("node name=Foo name:etymology:wikidata=Bar"); 86 assertEquals(0, errors.size()); 87 } 79 88 }
Note:
See TracChangeset
for help on using the changeset viewer.