aboutsummaryrefslogtreecommitdiff
path: root/test/compress/collapse_vars.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r--test/compress/collapse_vars.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js
index 858d3d41..31978c29 100644
--- a/test/compress/collapse_vars.js
+++ b/test/compress/collapse_vars.js
@@ -6348,3 +6348,42 @@ issue_3526_2: {
}
expect_stdout: "PASS"
}
+
+issue_3562: {
+ options = {
+ collapse_vars: true,
+ conditionals: true,
+ sequences: true,
+ }
+ input: {
+ function f(a) {
+ console.log("PASS", a);
+ }
+ function g(b) {
+ console.log("FAIL", b);
+ }
+ var h;
+ var c;
+ if (console) {
+ h = f;
+ c = "PASS";
+ } else {
+ h = g;
+ c = "FAIL";
+ }
+ h(c);
+ }
+ expect: {
+ function f(a) {
+ console.log("PASS", a);
+ }
+ function g(b) {
+ console.log("FAIL", b);
+ }
+ var h;
+ var c;
+ c = console ? (h = f, "PASS") : (h = g, "FAIL"),
+ h(c);
+ }
+ expect_stdout: "PASS PASS"
+}
/po?id=d7aaf386111f6d54fcfb0bc2f8fe87c580039f0b'>po: Add 'guix/read-print.scm'.Ludovic Courtès This is a followup to b21d05d232ec0aba5abec20e83cc52c1d5163cc3. * po/guix/POTFILES.in: Add 'guix/read-print.scm'. 2022-08-10nls: Update translations.Julien Lepiller po/guix/bn.po: New file. po/guix/LINGUAS: Add it. 2022-07-09nls: Update translations.Julien Lepiller po/guix/tr.po: New file. po/guix/LINGUAS: Add it. 2022-06-24services: configuration: Report the location of field type errors.Ludovic Courtès Previously field type errors would be reported in a non-standard way, and without any source location information. This fixes it. * gnu/services/configuration.scm (configuration-field-error): Add a 'loc' parameter and honor it. Use 'formatted-message' instead of plain 'format'. (define-configuration-helper)[field-sanitizer]: New procedure. Use it. Use STEM as the identifier of the syntactic constructor of the record type. Add a 'sanitize' property to each field. Remove now useless STEM macro that would call 'validate-configuration'. * gnu/services/mail.scm (serialize-listener-configuration): Adjust to new 'configuration-field-error' prototype. * tests/services/configuration.scm ("wrong type for a field"): New test. * po/guix/POTFILES.in: Add gnu/services/configuration.scm. 2022-06-17home: Add OpenSSH service.Ludovic Courtès * gnu/home/services/ssh.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Secure Shell): New section. 2022-06-04nls: Update translations.Julien Lepiller po/packages/tr.po: New file. po/packages/LINGUAS: Add it. 2022-06-04guix home: Add 'edit' sub-command.Ludovic Courtès * guix/scripts/home/edit.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/home.scm (show-help): Add "edit". (process-command): Handle it. (guix-home): Add it. * po/guix/POTFILES.in: Add 'guix/scripts/home/edit.scm'. * doc/guix.texi (Invoking guix home): Document it. 2022-06-04guix system: Add 'edit' sub-command.Ludovic Courtès * guix/scripts/system/edit.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/system.scm (show-help): Mention "edit". (actions): Add it. (process-command): Handle it. * doc/guix.texi (Invoking guix system): Document it. * po/guix/POTFILES.in: Add guix/scripts/system/edit.scm. 2022-05-01nls: Update translations.Julien Lepiller po/guix/ja.po: New file. po/guix/LINGUAS: Add it. 2022-04-02nls: Update translations.Julien Lepiller * po/packages/fi.po: New file. * po/packages/LINGUAS: Add it. 2022-04-02nls: Enforce translation thresholds.Julien Lepiller * po/doc/guix-cookbook.es.po: Remove file. * po/doc/guix-cookbook.fa.po: Remove file. * po/doc/guix-cookbook.fi.po: Remove file. * po/doc/guix-cookbook.pt_BR.po: Remove file. * po/doc/guix-cookbook.ru.po: Remove file. * po/doc/guix-cookbook.uk.po: Remove file. * po/doc/guix-cookbook.zh_Hans.po: Remove file. * po/doc/guix-manual.fa.po: Remove file. * po/doc/guix-manual.fi.po: Remove file. * po/doc/guix-manual.it.po: Remove file. * po/doc/guix-manual.ko.po: Remove file. * po/doc/guix-manual.sk.po: Remove file. * po/doc/local.mk: Remove them. * doc/local.mk: Remove them. 2022-03-18graph: Factorize 'lookup-backend'.Ludovic Courtès * guix/graph.scm (lookup-backend): New procedure. * guix/scripts/graph.scm (lookup-backend): Remove. * guix/scripts/system.scm (lookup-backend): Remove. * po/guix/POTFILES.in: Add 'guix/graph.scm'. 2022-03-01nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.uk.po: New file. * po/doc/local.mk: Add uk cookbook. * doc/local.mk: Add uk cookbook. * po/guix/fa.po: New file. * po/guix/uk.po: New file. * po/guix/LINGUAS: Add fa and uk. 2022-02-04nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.pt_BR.po: New file. * po/doc/local.mk: Add it. * doc/local.mk: Add pt_BR cookbook. 2022-01-09nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.fi.po: New file. * po/doc/guix-manual.fi.po: New file. * po/doc/local.mk: Add them. * doc/local.mk: Add them. * po/guix/fi.po: New file. * po/guix/LINGUAS: Add it. 2022-01-03home: services: Make strings in Gexps translateble.Xinglu Chen * gnu/home/services.scm (%initialize-gettext): New variable. (compute-on-first-login-script): Use it. (compute-on-change-gexp): Likewise. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Likewise. * po/guix/POTFILES.in: Add gnu/home-services.scm and gnu/home/services/symlink-manager.scm. Suggested-by: Ludovic Courtès <ludo@gnu.org> Link: <https://yhetil.org/guix-bugs/87sfvy8k1u.fsf@gnu.org> Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2021-12-10Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe 2021-12-08nls: Update 'es' translation.Julien Lepiller 2021-12-05Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus 2021-12-04nls: Update translations.Julien Lepiller 2021-11-08Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner 2021-11-06nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.es.po: New file. * po/doc/local.mk: Add 'es' cookbook. * doc/local.mk: Add 'es' cookbook. 2021-10-31Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner 2021-10-25Add 'guix shell'.Ludovic Courtès * guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell". 2021-10-18Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe 2021-10-17nls: Update translations.Julien Lepiller 2021-10-12Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe 2021-10-01po: Update POTFILES.in.Julien Lepiller * po/guix/POTFILES.in: Add missing files that contain messages to be translated. 2021-09-07Merge branch 'master' into core-updates-frozenLudovic Courtès 2021-09-02nls: Update translations.Julien Lepiller * po/packages/it.po: New file. * po/packages/LINGUAS: Add `it'. * po/*/*.po: Update translations. 2021-08-12Merge branch 'master' into core-updates-frozenMarius Bakke Conflicts: gnu/packages/algebra.scm gnu/packages/games.scm gnu/packages/golang.scm gnu/packages/kerberos.scm gnu/packages/mail.scm gnu/packages/python.scm gnu/packages/ruby.scm gnu/packages/scheme.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm