Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/SearchDialog.java
r16260 r16268 292 292 GBC.eol()); 293 293 hintPanel.add(new SearchKeywordRow(hcbSearchString) 294 .addKeyword("<i>key</i>", null, tr("matches if ''key'' exists")) 294 .addKeyword("<i>key:</i>", null, tr("matches if ''key'' exists")) 295 295 .addKeyword("<i>key</i>=<i>value</i>", null, tr("''key'' with exactly ''value''")) 296 296 .addKeyword("<i>key</i>~<i>regexp</i>", null, tr("value of ''key'' matching the regular expression ''regexp''")) -
trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
r16260 r16268 540 540 541 541 /** 542 * Test whether a key exists. 543 * @throws SearchParseError never 544 */ 545 @Test 546 public void testKeyExists15943() throws SearchParseError { 547 Match matcher = SearchCompiler.compile("surface:"); 548 assertTrue(matcher.match(new Tag("surface", ""))); 549 assertTrue(matcher.match(new Tag("surface", "wood"))); 550 assertFalse(matcher.match(new Tag("surface:source", "xxx"))); 551 assertFalse(matcher.match(new Tag("foo", "bar"))); 552 assertFalse(matcher.match(new Tag("name", "foo:surface:bar"))); 553 } 554 555 /** 542 556 * Unit test of {@link SearchCompiler.ExactKeyValue.Mode} enum. 543 557 */
Note:
See TracChangeset
for help on using the changeset viewer.