Changeset 11192 in josm for trunk/test


Ignore:
Timestamp:
2016-10-30T15:25:57+01:00 (7 years ago)
Author:
Don-vip
Message:

fix #13870 - robustness against https://bugs.openjdk.java.net/browse/JI-9044959

File:
1 edited

Legend:

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

    r10373 r11192  
    99import org.junit.Rule;
    1010import org.junit.Test;
     11import org.openstreetmap.josm.actions.search.SearchAction.SearchSetting;
    1112import org.openstreetmap.josm.actions.search.SearchCompiler.Match;
    1213import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError;
     
    449450        assertTrue(SearchCompiler.compile(search2).match(tag2));
    450451    }
     452
     453    /**
     454     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13870">Bug #13870</a>.
     455     * @throws ParseError always
     456     */
     457    @Test(expected = ParseError.class)
     458    public void testPattern13870() throws ParseError {
     459        // https://bugs.openjdk.java.net/browse/JI-9044959
     460        SearchSetting setting = new SearchSetting();
     461        setting.regexSearch = true;
     462        setting.text = "[";
     463        SearchCompiler.compile(setting);
     464    }
    451465}
Note: See TracChangeset for help on using the changeset viewer.