Fix regression causing tests to fail on windows
authorAnthony Van de Gejuchte <anthonyvdgent@gmail.com>
Tue, 3 May 2016 15:41:40 +0000 (17:41 +0200)
committerRichard van Velzen <rvanvelzen@experty.com>
Wed, 4 May 2016 18:05:51 +0000 (20:05 +0200)
test/run-tests.js

index 763575a..0a249b9 100755 (executable)
@@ -132,8 +132,10 @@ function run_compress_tests() {
                     beautify: false,
                     quote_style: 2, // force double quote to match JSON
                 });
+                warnings_emitted = warnings_emitted.map(function(input) {
+                  return input.split(process.cwd() + path.sep).join("").split(path.sep).join("/");
+                });
                 var actual_warnings = JSON.stringify(warnings_emitted);
-                actual_warnings = actual_warnings.split(process.cwd() + "/").join("");
                 if (expected_warnings != actual_warnings) {
                     log("!!! failed\n---INPUT---\n{input}\n---EXPECTED WARNINGS---\n{expected_warnings}\n---ACTUAL WARNINGS---\n{actual_warnings}\n\n", {
                         input: input_code,