diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-29 01:27:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-29 01:27:24 +0800 |
commit | ec7f37f314eb834d36eb64dddb8b5fe0934e50b1 (patch) | |
tree | a9f294bb82bcb75df2accbfc1ac0d9af31e88da9 | |
parent | eb48a035e7880e73e7fe4f23727775cff365ffbc (diff) | |
download | tracifyjs-ec7f37f314eb834d36eb64dddb8b5fe0934e50b1.tar.gz tracifyjs-ec7f37f314eb834d36eb64dddb8b5fe0934e50b1.zip |
remove UGLIFY_DEBUG (#1720)
fixes #1719
-rw-r--r-- | test/mocha/directives.js | 13 | ||||
-rwxr-xr-x | test/run-tests.js | 2 | ||||
-rw-r--r-- | tools/exports.js | 4 |
3 files changed, 7 insertions, 12 deletions
diff --git a/test/mocha/directives.js b/test/mocha/directives.js index bc763ae0..5189f1ad 100644 --- a/test/mocha/directives.js +++ b/test/mocha/directives.js @@ -176,7 +176,7 @@ describe("Directives", function() { }); it("Should test EXPECT_DIRECTIVE RegExp", function() { - var tests = [ + [ ["", true], ["'test';", true], ["'test';;", true], @@ -185,11 +185,12 @@ describe("Directives", function() { ["'tests'; \n\t", true], ["'tests';\n\n", true], ["\n\n\"use strict\";\n\n", true] - ]; - - for (var i = 0; i < tests.length; i++) { - assert.strictEqual(uglify.EXPECT_DIRECTIVE.test(tests[i][0]), tests[i][1], tests[i][0]); - } + ].forEach(function(test) { + var out = uglify.OutputStream(); + out.print(test[0]); + out.print_string("", null, true); + assert.strictEqual(out.get() === test[0] + ';""', test[1], test[0]); + }); }); it("Should only print 2 semicolons spread over 2 lines in beautify mode", function() { diff --git a/test/run-tests.js b/test/run-tests.js index 3d291416..4870873d 100755 --- a/test/run-tests.js +++ b/test/run-tests.js @@ -1,7 +1,5 @@ #! /usr/bin/env node -global.UGLIFY_DEBUG = true; - var U = require("../tools/node"); var path = require("path"); var fs = require("fs"); diff --git a/tools/exports.js b/tools/exports.js index d83739d5..09acc13e 100644 --- a/tools/exports.js +++ b/tools/exports.js @@ -17,7 +17,3 @@ exports["string_template"] = string_template; exports["tokenizer"] = tokenizer; exports["is_identifier"] = is_identifier; exports["SymbolDef"] = SymbolDef; - -if (global.UGLIFY_DEBUG) { - exports["EXPECT_DIRECTIVE"] = EXPECT_DIRECTIVE; -} |