aboutsummaryrefslogtreecommitdiff
path: root/test/compress/pure_funcs.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-03-14 21:36:45 +0800
committerGitHub <noreply@github.com>2019-03-14 21:36:45 +0800
commite49297e5eb7039246cc3a78019234826631eb623 (patch)
treea0cf11f0807a16f358feb323ccc16fa9f86c1020 /test/compress/pure_funcs.js
parentebd82b3fb6773f1985752550254a2effcc70b4af (diff)
downloadtracifyjs-e49297e5eb7039246cc3a78019234826631eb623.tar.gz
tracifyjs-e49297e5eb7039246cc3a78019234826631eb623.zip
improve usability of `pure_funcs` (#3336)
fixes #3325
Diffstat (limited to 'test/compress/pure_funcs.js')
-rw-r--r--test/compress/pure_funcs.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/compress/pure_funcs.js b/test/compress/pure_funcs.js
index 56c36dd7..48140dd6 100644
--- a/test/compress/pure_funcs.js
+++ b/test/compress/pure_funcs.js
@@ -642,3 +642,41 @@ issue_3065_4: {
})();
}
}
+
+issue_3325_1: {
+ options = {
+ pure_funcs: "cb",
+ side_effects: true,
+ }
+ input: {
+ function cb() {
+ console.log("PASS");
+ }
+ cb();
+ }
+ expect: {
+ function cb() {
+ console.log("PASS");
+ }
+ }
+}
+
+issue_3325_2: {
+ options = {
+ pure_funcs: "xxxcbxxx",
+ side_effects: true,
+ }
+ input: {
+ function cb() {
+ console.log("PASS");
+ }
+ cb();
+ }
+ expect: {
+ function cb() {
+ console.log("PASS");
+ }
+ cb();
+ }
+ expect_stdout: "PASS"
+}