Changeset 17746 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2021-04-11T13:09:44+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
r17277 r17746 147 147 148 148 /** 149 * Search by case-sensitive regular expression. 150 * @throws SearchParseError if an error has been encountered while compiling 151 */ 152 @Test 153 void testRegexpCaseSensitive() throws Exception { 154 SearchSetting searchSetting = new SearchSetting(); 155 searchSetting.regexSearch = true; 156 searchSetting.text = "foo=\"^bar$\""; 157 assertTrue(SearchCompiler.compile(searchSetting).match(OsmUtils.createPrimitive("node foo=bar"))); 158 assertTrue(SearchCompiler.compile(searchSetting).match(OsmUtils.createPrimitive("node foo=BAR"))); 159 searchSetting.caseSensitive = true; 160 assertTrue(SearchCompiler.compile(searchSetting).match(OsmUtils.createPrimitive("node foo=bar"))); 161 assertFalse(SearchCompiler.compile(searchSetting).match(OsmUtils.createPrimitive("node foo=BAR"))); 162 } 163 164 /** 149 165 * Search by comparison. 150 166 * @throws SearchParseError if an error has been encountered while compiling
Note:
See TracChangeset
for help on using the changeset viewer.