Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r14469 r14481 2 2 package org.openstreetmap.josm.data.validation.tests; 3 3 4 import static org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.FixCommand.evaluateObject;5 4 import static org.openstreetmap.josm.tools.I18n.tr; 6 5 … … 491 490 } else if (val != null && "group".equals(ai.key)) { 492 491 check.group = val; 492 } else if (ai.key.startsWith("-")) { 493 Logging.debug("Ignoring extension instruction: " + ai.key + ": " + ai.val); 493 494 } else { 494 495 throw new IllegalDataException("Cannot add instruction " + ai.key + ": " + ai.val + '!'); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r12987 r14481 166 166 { 167 167 < IDENT: ["a"-"z","A"-"Z","_"] ( ["a"-"z","A"-"Z","_","-","0"-"9"] )* > 168 | < EXTIDENT: <MINUS> <IDENT> > 168 169 | < UINT: ( ["0"-"9"] )+ > 169 170 | < STRING: "\"" ( [" ","!","#"-"[","]"-"~","\u0080"-"\uFFFF"] | "\\\"" | "\\\\" )* "\"" > … … 283 284 { 284 285 ( 285 (t=<PP_AND> | t=<PP_OR> | t=<PP_NOT> | t=<UINT> | t=<STRING> | t=<REGEX> | t=<LPAR> | t=<RPAR> | t=<COMMA> | t=<COLON> | t=<IDENT> | t=< PP_SOMETHING_ELSE>) { if (write) sb.append(t.image); }286 (t=<PP_AND> | t=<PP_OR> | t=<PP_NOT> | t=<UINT> | t=<STRING> | t=<REGEX> | t=<LPAR> | t=<RPAR> | t=<COMMA> | t=<COLON> | t=<IDENT> | t=<EXTIDENT> | t=<PP_SOMETHING_ELSE>) { if (write) sb.append(t.image); } 286 287 | 287 288 pp_w1() … … 906 907 ) 907 908 | 909 <EXTIDENT> w() <COLON> w() expression() <SEMICOLON> w() 910 | 908 911 key=<IDENT> w() <COLON> w() 909 912 ( -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
r14138 r14481 220 220 } 221 221 222 /** 223 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17053">Bug #17053</a>. 224 * @throws ParseException if a parsing error occurs 225 */ 226 @Test 227 public void testTicket17053() throws ParseException { 228 final MapCSSTagChecker test = buildTagChecker( 229 "way[highway=cycleway][cycleway=track] {\n" + 230 " throwWarning: tr(\"{0} with {1}\", \"{0.tag}\", \"{1.tag}\");\n" + 231 " -osmoseItemClassLevel: \"3032/30328/2\";\n" + 232 " -osmoseTags: list(\"tag\", \"highway\", \"cycleway\");\n" + 233 " fixRemove: \"cycleway\";\n" + 234 "}"); 235 assertEquals(1, test.checks.size()); 236 TagCheck check = test.checks.get("test").iterator().next(); 237 assertEquals(1, check.fixCommands.size()); 238 assertEquals(2, check.rule.declaration.instructions.size()); 239 } 240 222 241 private void doTestNaturalWood(int ticket, String filename, int errorsCount, int setsCount) throws Exception { 223 242 final MapCSSTagChecker test = buildTagChecker(
Note:
See TracChangeset
for help on using the changeset viewer.