Changeset 9857 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r9336 r9857 162 162 | < STRING: "\"" ( [" ","!","#"-"[","]"-"~","\u0080"-"\uFFFF"] | "\\\"" | "\\\\" )* "\"" > 163 163 | < #PREDEFINED: "\\" ["d","D","s","S","w","W","b","B","A","G","Z","z"] > 164 | < #REGEX_CHAR_WITHOUT_STAR: [" "-")","+"-".","0"-"[","]"-"~","\u0080"-"\uFFFF"] | "\\/" | "\\\\" | "\\[" | "\\]" | "\\+" | "\\." | "\\'" | "\\\"" | "\\(" | "\\)" | "\\{" | "\\}" | "\\?" | "\\*" | "\\^" | "\\$" | "\\|" | <PREDEFINED> >164 | < #REGEX_CHAR_WITHOUT_STAR: [" "-")","+"-".","0"-"[","]"-"~","\u0080"-"\uFFFF"] | "\\/" | "\\\\" | "\\[" | "\\]" | "\\+" | "\\." | "\\'" | "\\\"" | "\\(" | "\\)" | "\\{" | "\\}" | "\\?" | "\\*" | "\\^" | "\\$" | "\\|" | "\\p" |<PREDEFINED> > 165 165 | < REGEX: "/" <REGEX_CHAR_WITHOUT_STAR> ( <REGEX_CHAR_WITHOUT_STAR> | "*" )* "/" > 166 166 | < LBRACE: "{" > -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
r8784 r9857 433 433 assert mc.getCascade(Environment.DEFAULT_LAYER).get("max_split", -777f, Float.class) == 56 434 434 } 435 436 @Test 437 public void testTicket12549() throws Exception { 438 def condition = getParser("[name =~ /^(?i)(?u)fóo\$/]").condition(Condition.Context.PRIMITIVE) 439 assert condition.applies(new Environment(OsmUtils.createPrimitive("way name=fóo"))) 440 assert condition.applies(new Environment(OsmUtils.createPrimitive("way name=fÓo"))) 441 condition = getParser("[name =~ /^(\\p{Lower})+\$/]").condition(Condition.Context.PRIMITIVE) 442 assert !condition.applies(new Environment(OsmUtils.createPrimitive("way name=fóo"))) 443 condition = getParser("[name =~ /^(?U)(\\p{Lower})+\$/]").condition(Condition.Context.PRIMITIVE) 444 assert condition.applies(new Environment(OsmUtils.createPrimitive("way name=fóo"))) 445 assert !condition.applies(new Environment(OsmUtils.createPrimitive("way name=fÓo"))) 446 } 435 447 }
Note:
See TracChangeset
for help on using the changeset viewer.