Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r14489 r14540 993 993 .map(e -> ((LiteralExpression) e).getLiteral()) 994 994 .filter(l -> l instanceof String) 995 .map(l -> ( String) l)995 .map(l -> ((String) l).split(",")[0]) 996 996 .findFirst(); 997 997 } -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
r14484 r14540 207 207 208 208 /** 209 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17058">Bug #17058</a>. 210 * @throws ParseException if a parsing error occurs 211 */ 212 @Test 213 public void testTicket17058() throws ParseException { 214 final MapCSSTagChecker test = buildTagChecker( 215 "*[name =~ /(?i).*Straße.*/][inside(\"LI,CH\")] {\n" + 216 " throwError: tr(\"street name contains ß\");\n" + 217 " assertMatch: \"way name=Hauptstraße\";\n" + 218 " assertNoMatch: \"way name=Hauptstrasse\";\n" + 219 "}"); 220 Set<String> errors = test.checkAsserts(test.checks.get("test")); 221 assertTrue(errors.toString(), errors.isEmpty()); 222 } 223 224 /** 209 225 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13762">Bug #13762</a>. 210 226 * @throws ParseException if a parsing error occurs
Note:
See TracChangeset
for help on using the changeset viewer.