From 8d74f3437352e22b3fd18ce602a4378170ec6598 Mon Sep 17 00:00:00 2001 From: Anthony Van de Gejuchte Date: Sun, 16 Oct 2016 20:57:28 +0200 Subject: Don't filter shebangs when using the 'some' comment filter Also clarify documentation a bit more about using regexp as filter --- test/mocha/comment-filter.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/mocha/comment-filter.js b/test/mocha/comment-filter.js index 4330d1eb..79162755 100644 --- a/test/mocha/comment-filter.js +++ b/test/mocha/comment-filter.js @@ -57,4 +57,9 @@ describe("comment filters", function() { assert.strictEqual(ast.print_to_string({comments: f}), "#!Random comment\n//test1\n/*test2*/\n"); }); + + it("Should never be able to filter comment5 when using 'some' as filter", function() { + var ast = UglifyJS.parse("#!foo\n//foo\n/*@preserve*/\n/* please hide me */"); + assert.strictEqual(ast.print_to_string({comments: "some"}), "#!foo\n/*@preserve*/\n"); + }); }); -- cgit v1.2.3