Changeset 15318 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
r15277 r15318 54 54 try (CachedFile cf = new CachedFile("resource://data/validator/opening_hours.js"); 55 55 Reader reader = cf.getContentReader()) { 56 ENGINE.eval( 57 "var global=this;var window=this;var process={env:{}};" + 58 "var console={};console.debug=print;console.log=print;console.warn=print;console.error=print;"); 56 ENGINE.eval("var console={};console.debug=print;console.log=print;console.warn=print;console.error=print;"); 59 57 ENGINE.eval(reader); 60 58 ENGINE.eval("var opening_hours = require('opening_hours');"); -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java
r13147 r15318 26 26 import org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem; 27 27 import org.openstreetmap.josm.testutils.JOSMTestRules; 28 import org.openstreetmap.josm.tools.Logging; 28 29 29 30 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 234 235 } 235 236 } 237 238 /** 239 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17932">Bug #17932</a>. 240 */ 241 @Test 242 public void testTicket17932() { 243 Logging.clearLastErrorAndWarnings(); 244 assertTrue(openingHourTest.checkOpeningHourSyntax("opening_hours", "SH off").isEmpty()); 245 List<String> errors = Logging.getLastErrorAndWarnings(); 246 assertFalse(errors.isEmpty()); 247 assertTrue(errors.get(0), errors.get(0).contains("no SH definition")); 248 } 236 249 }
Note:
See TracChangeset
for help on using the changeset viewer.