Ignore:
Timestamp:
2021-10-26T00:57:23+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #21463 - Fix parsing of empty parenthesis pairs in search expressions (patch by Woazboat)

File:
1 edited

Legend:

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

    r18195 r18291  
    841841        assertThrows(SearchParseError.class, () -> SearchCompiler.compile(searchString));
    842842    }
     843
     844    /**
     845     * Non-regression test for JOSM #21463
     846     */
     847    @Test
     848    void testNonRegression21463() throws SearchParseError {
     849        final SearchCompiler.Match c = SearchCompiler.compile("foo () () () bar");
     850        assertTrue(c.match(OsmUtils.createPrimitive("node foo=bar")));
     851        assertFalse(c.match(OsmUtils.createPrimitive("node name=bar")));
     852    }
    843853}
Note: See TracChangeset for help on using the changeset viewer.