From d854523783b4a73d1dd734605f1c41fcae86e932 Mon Sep 17 00:00:00 2001 From: kzc Date: Tue, 16 Aug 2016 21:54:54 -0400 Subject: Fix negate_iife regression #1254 --- test/compress/negate-iife.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/compress') diff --git a/test/compress/negate-iife.js b/test/compress/negate-iife.js index b73ff547..aa95d958 100644 --- a/test/compress/negate-iife.js +++ b/test/compress/negate-iife.js @@ -130,3 +130,31 @@ negate_iife_issue_1073: { }(7))(); } } + +issue_1254_negate_iife_false: { + options = { + negate_iife: false, + } + input: { + (function() { + return function() { + console.log('test') + }; + })()(); + } + expect_exact: '(function(){return function(){console.log("test")}})()();' +} + +issue_1254_negate_iife_true: { + options = { + negate_iife: true, + } + input: { + (function() { + return function() { + console.log('test') + }; + })()(); + } + expect_exact: '!function(){return function(){console.log("test")}}()();' +} -- cgit v1.2.3