Changeset 14489 in josm
- Timestamp:
- 2018-12-02T15:30:24+01:00 (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r14486 r14489 469 469 try { 470 470 final String val = ai.val instanceof Expression 471 ? Optional.of (((Expression) ai.val).evaluate(new Environment())).map(Object::toString).orElse(null)471 ? Optional.ofNullable(((Expression) ai.val).evaluate(new Environment())).map(Object::toString).orElse(null) 472 472 : ai.val instanceof String 473 473 ? (String) ai.val -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r14481 r14489 166 166 { 167 167 < IDENT: ["a"-"z","A"-"Z","_"] ( ["a"-"z","A"-"Z","_","-","0"-"9"] )* > 168 | < EXTIDENT: <MINUS> <IDENT> >169 168 | < UINT: ( ["0"-"9"] )+ > 170 169 | < STRING: "\"" ( [" ","!","#"-"[","]"-"~","\u0080"-"\uFFFF"] | "\\\"" | "\\\\" )* "\"" > … … 284 283 { 285 284 ( 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); }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); } 287 286 | 288 287 pp_w1() … … 907 906 ) 908 907 | 909 < EXTIDENT> w() <COLON> w() expression() <SEMICOLON> w()908 <MINUS> <IDENT> w() <COLON> w() expression() <SEMICOLON> w() 910 909 | 911 910 key=<IDENT> w() <COLON> w() -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
r14142 r14489 461 461 assertFalse(condition.applies(new Environment(OsmUtils.createPrimitive("way name=fÓo")))); 462 462 } 463 464 /** 465 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17053">Bug #17053</a>. 466 */ 467 @Test 468 public void testTicket17053() { 469 MapCSSStyleSource sheet = new MapCSSStyleSource( 470 "way {\n" + 471 " placement_offset: eval(\n" + 472 " cond(prop(\"placement_value\")=\"right_of:1\",eval((prop(lane_width_forward_1)/2)-prop(lane_offset_forward_1)),\n" + 473 " 0\n" + 474 " )\n" + 475 " );\n" + 476 "}"); 477 sheet.loadStyleSource(); 478 assertTrue(sheet.getErrors().toString(), sheet.getErrors().isEmpty()); 479 } 463 480 } -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
r14488 r14489 83 83 checkUrl(info, info.getAttributionLinkURL()); 84 84 String eula = info.getEulaAcceptanceRequired(); 85 if (eula != null) {85 if (eula != null) { 86 86 checkUrl(info, eula.replaceAll("\\{lang\\}", "")); 87 87 }
Note:
See TracChangeset
for help on using the changeset viewer.