aboutsummaryrefslogtreecommitdiff
path: root/test/compress/functions.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-06-28 18:16:49 +0800
committerGitHub <noreply@github.com>2018-06-28 18:16:49 +0800
commit76df77c08c684bc49bebb35d6d527d90cea48108 (patch)
treeb9b81b75e4e0556cab728dccbcf82823c2bd0274 /test/compress/functions.js
parent957d5537a80fcb4037df21f0dbe16391fd0424ad (diff)
downloadtracifyjs-76df77c08c684bc49bebb35d6d527d90cea48108.tar.gz
tracifyjs-76df77c08c684bc49bebb35d6d527d90cea48108.zip
implement `directives` (#3203)
fixes #3166
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r--test/compress/functions.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index e7391e56..ec0b72a7 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -2025,6 +2025,7 @@ deduplicate_parenthesis: {
drop_lone_use_strict: {
options = {
+ directives: true,
side_effects: true,
}
input: {
@@ -2052,6 +2053,27 @@ drop_lone_use_strict: {
}
}
+issue_3166: {
+ options = {
+ directives: true,
+ }
+ input: {
+ "foo";
+ "use strict";
+ function f() {
+ "use strict";
+ "bar";
+ "use asm";
+ }
+ }
+ expect: {
+ "use strict";
+ function f() {
+ "use asm";
+ }
+ }
+}
+
issue_3016_1: {
options = {
inline: true,