aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/const.js40
-rw-r--r--test/compress/functions.js52
2 files changed, 87 insertions, 5 deletions
diff --git a/test/compress/const.js b/test/compress/const.js
index 896e8c38..9ffb0d34 100644
--- a/test/compress/const.js
+++ b/test/compress/const.js
@@ -1135,3 +1135,43 @@ issue_4248: {
}
expect_stdout: "PASS"
}
+
+issue_4261: {
+ options = {
+ inline: true,
+ reduce_funcs: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ {
+ const a = 42;
+ (function() {
+ function f() {
+ console.log(a);
+ }
+ function g() {
+ while (f());
+ }
+ (function() {
+ while (g());
+ })();
+ })();
+ }
+ }
+ expect: {
+ {
+ const a = 42;
+ (function() {
+ function g() {
+ while (void console.log(a));
+ }
+ (function() {
+ while (g());
+ })();
+ })();
+ }
+ }
+ expect_stdout: "42"
+}
diff --git a/test/compress/functions.js b/test/compress/functions.js
index c2ab23f6..3b57fb2b 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -2081,7 +2081,7 @@ issue_3016_1: {
var b = 1;
do {
3[b];
- } while(0);
+ } while (0);
console.log(b);
}
expect_stdout: "1"
@@ -2112,7 +2112,7 @@ issue_3016_2: {
do {
a = 3,
a[b];
- } while(0);
+ } while (0);
var a;
console.log(b);
}
@@ -2145,7 +2145,7 @@ issue_3016_2_ie8: {
do {
a = 3,
a[b];
- } while(0);
+ } while (0);
var a;
console.log(b);
}
@@ -2175,7 +2175,7 @@ issue_3016_3: {
var b = 1;
do {
console.log((a = void 0, a ? "FAIL" : a = "PASS"));
- } while(b--);
+ } while (b--);
var a;
}
expect_stdout: [
@@ -2208,7 +2208,7 @@ issue_3016_3_ie8: {
var b = 1;
do {
console.log((a = void 0, a ? "FAIL" : a = "PASS"));
- } while(b--);
+ } while (b--);
var a;
}
expect_stdout: [
@@ -5141,3 +5141,45 @@ issue_4259: {
}
expect_stdout: "function"
}
+
+issue_4261: {
+ options = {
+ inline: true,
+ reduce_funcs: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ try {
+ throw 42;
+ } catch (e) {
+ (function() {
+ function f() {
+ e.p;
+ }
+ function g() {
+ while (f());
+ }
+ (function() {
+ while (console.log(g()));
+ })();
+ })();
+ }
+ }
+ expect: {
+ try {
+ throw 42;
+ } catch (e) {
+ (function() {
+ function g() {
+ while (void e.p);
+ }
+ (function() {
+ while (console.log(g()));
+ })();
+ })();
+ }
+ }
+ expect_stdout: true
+}
st that mysql_upgrade has run. Marius Bakke 2020-11-28services: MySQL: Deprecate 'mysql-service'....* gnu/services/databases.scm (mysql-service): Define in terms of DEFINE-DEPRECATED. * gnu/tests/databases.scm (%mysql-os): Adjust accordingly. * doc/guix.texi (Database Services): Adjust the MariaDB/MySQL section to document MYSQL-SERVICE-TYPE instead of MYSQL-SERVICE. While at it, document the EXTRA-CONTENT field. Marius Bakke 2020-10-20services: databases: Don't specify a default postgresql version....Currently, if the postgresql package major version changes, this is going to break the service upon upgrade, because PostgreSQL will reject the data files from the differing major version of the service. Because it's important to either keep running a particular major version, or intentionally upgrade, I think the configuration would be better with no default. I think this is also going to be helpful when trying to assist users upgrading PostgreSQL. * gnu/services/databases.scm (<postgresql-configuration>): Remove default for postgresql. (postgresql-service-type): Remove the default value. * gnu/tests/databases.scm (%postgresql-os): Update accordingly. * gnu/tests/guix.scm (%guix-data-service-os): Update accordingly. * gnu/tests/monitoring.scm (%zabbix-os): Update accordingly. * gnu/tests/web.scm (patchwork-os): Update accordingly. * doc/guix.texi (PostgreSQL): Update accordingly. Christopher Baines