Ignore:
Timestamp:
2018-01-14T01:04:51+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #15755 - Unprocessed HTML in search error box

File:
1 edited

Legend:

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

    r12659 r13317  
    1818import org.junit.Rule;
    1919import org.junit.Test;
     20import org.junit.rules.ExpectedException;
    2021import org.openstreetmap.josm.TestUtils;
    2122import org.openstreetmap.josm.data.coor.LatLon;
     
    5556    public JOSMTestRules test = new JOSMTestRules().preferences();
    5657
     58    /**
     59     * Rule to assert exception message.
     60     */
     61    @Rule
     62    public ExpectedException expectedEx = ExpectedException.none();
     63
    5764    private static final class SearchContext {
    5865        final DataSet ds = new DataSet();
     
    686693        }
    687694    }
     695
     696    /**
     697     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/15755">Bug #15755</a>.
     698     * @throws SearchParseError always
     699     */
     700    @Test
     701    public void testTicket15755() throws SearchParseError {
     702        expectedEx.expect(SearchParseError.class);
     703        expectedEx.expectMessage("<html>Expecting <code>:</code> after <i>type</i></html>");
     704        SearchCompiler.compile("public_transport=stop_area -type");
     705    }
    688706}
Note: See TracChangeset for help on using the changeset viewer.