Ignore:
Timestamp:
2020-11-23T19:59:45+01:00 (3 years ago)
Author:
GerdP
Message:

fix #20037: Overpass query wizard generates wrong query with "*=value"

  • remove obsolete getInstance()
  • fix bug and add unit test
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/SearchCompilerQueryWizardTest.java

    r17275 r17336  
    2424
    2525    private static String constructQuery(String s) {
    26         return SearchCompilerQueryWizard.getInstance().constructQuery(s);
     26        return SearchCompilerQueryWizard.constructQuery(s);
    2727    }
    2828
     
    241241                "type:relation and type=multipolygon and -landuse=* and -\"area:highway\"=*");
    242242    }
     243
     244    /**
     245     * Test for ticket <a href="https://josm.openstreetmap.de/ticket/20037>#20037</a>
     246     */
     247    @Test
     248    void testTicket20037() {
     249        assertQueryEquals(
     250                "  node[~\"^.*$\"~\"forward\"];\n" +
     251                "  node[~\"^.*$\"~\"backward\"];\n",
     252                "type:node AND (*=forward OR *=backward)");
     253    }
    243254}
Note: See TracChangeset for help on using the changeset viewer.