Changeset 13430 in josm for trunk/test


Ignore:
Timestamp:
2018-02-17T15:40:42+01:00 (18 months ago)
Author:
Don-vip
Message:

fix #15943 - allow to search empty values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java

    r13325 r13430  
    496496
    497497    /**
     498     * Test empty values.
     499     * @throws SearchParseError never
     500     */
     501    @Test
     502    public void testEmptyValues15943() throws SearchParseError {
     503        Match matcher = SearchCompiler.compile("access=");
     504        assertTrue(matcher.match(new Tag("access", null)));
     505        assertTrue(matcher.match(new Tag("access", "")));
     506        assertFalse(matcher.match(new Tag("access", "private")));
     507    }
     508
     509    /**
    498510     * Unit test of {@link SearchCompiler.ExactKeyValue.Mode} enum.
    499511     */
     
    562574    }
    563575
    564 
    565576    /**
    566577     * Ensures that correct presets are stored in the {@link org.openstreetmap.josm.data.osm.search.SearchCompiler.Preset}
Note: See TracChangeset for help on using the changeset viewer.