Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r9239 r9247 157 157 { 158 158 < IDENT: ["a"-"z","A"-"Z","_"] ( ["a"-"z","A"-"Z","_","-","0"-"9"] )* > 159 | < UINT: ["1"-"9"] ( ["0"-"9"] )*>159 | < UINT: ( ["0"-"9"] )+ > 160 160 | < STRING: "\"" ( [" ","!","#"-"[","]"-"~","\u0080"-"\uFFFF"] | "\\\"" | "\\\\" )* "\"" > 161 161 | < #PREDEFINED: "\\" ["d","D","s","S","w","W","b","B","A","G","Z","z"] > -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/KeyValueConditionTest.groovy
r9214 r9247 101 101 assert selNeg.matches(new Environment(OsmUtils.createPrimitive("way foo=bar src=1,2"))) 102 102 } 103 104 @Test 105 public void testValueFive() throws Exception { 106 // ticket #5985 107 def sel = new MapCSSParser(new StringReader("*[width=5]")).selector() 108 assert sel.matches(new Environment(OsmUtils.createPrimitive("way highway=track width=5"))) 109 assert !sel.matches(new Environment(OsmUtils.createPrimitive("way highway=track width=2"))) 110 } 111 112 @Test 113 public void testValueZero() throws Exception { 114 // ticket #12267 115 def sel = new MapCSSParser(new StringReader("*[frequency=0]")).selector() 116 assert sel.matches(new Environment(OsmUtils.createPrimitive("way railway=rail frequency=0"))) 117 assert !sel.matches(new Environment(OsmUtils.createPrimitive("way railway=rail frequency=50"))) 118 } 103 119 }
Note:
See TracChangeset
for help on using the changeset viewer.