diff options
Diffstat (limited to 'test/ufuzz/index.js')
-rw-r--r-- | test/ufuzz/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index dfa27ac0..36224667 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1090,9 +1090,10 @@ function log(options) { } function fuzzy_match(original, uglified) { - original = original.split(" ", 5); - uglified = uglified.split(" ", 5); - for (var i = 0; i < 5; i++) { + uglified = uglified.split(" "); + var i = uglified.length; + original = original.split(" ", i); + while (--i >= 0) { if (original[i] === uglified[i]) continue; var a = +original[i]; var b = +uglified[i]; @@ -1128,7 +1129,7 @@ for (var round = 1; round <= num_iterations; round++) { ok = fuzzy_match(original_result, uglify_result); if (!ok) { var fuzzy_result = sandbox.run_code(original_code.replace(/( - 0\.1){3}/g, " - 0.3")); - ok = sandbox.same_stdout(fuzzy_result, uglify_result, o.toplevel); + ok = sandbox.same_stdout(fuzzy_result, uglify_result); } } } else { |