var assert = require("assert"); var UglifyJS = require("../node"); describe("With", function() { it("Should throw syntaxError when using with statement in strict mode", function() { var code = '"use strict";\nthrow NotEarlyError;\nwith ({}) { }'; var test = function() { UglifyJS.parse(code); } var error = function(e) { return e instanceof UglifyJS.JS_Parse_Error && e.message === "Strict mode may not include a with statement"; } assert.throws(test, error); }); it("Should set uses_with for scopes involving With statements", function() { var ast = UglifyJS.parse("with(e) {f(1, 2)}"); ast.figure_out_scope(); assert.equal(ast.uses_with, true); assert.equal(ast.body[0].expression.scope.uses_with, true); assert.equal(ast.body[0].body.body[0].body.expression.scope.uses_with, true); }); }); ass='sub'>Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests
AgeCommit message (Expand)Author
2024-12-18gnu: Add tests/shadow.scm...This is a follow-up to commit a1ecd7f56c4ffadc49d5501a0df7f4c4556120c2 system: Add /etc/subuid and /etc/subgid support. This file was already registered in gnu/local.mk. * gnu/tests/shadow.scm: New file. Change-Id: I1785206d56357f8262bd4277ef48f29183c47adc Janneke Nieuwenhuizen
2024-12-18services: Add rootless-podman-service-type....* gnu/services/containers.scm: New file; (rootless-podman-configuration): new variable; (rootless-podman-service-subids): new variable; (rootless-podman-service-accounts): new variable; (rootless-podman-service-profile): new variable; (rootless-podman-shepherd-services): new variable; (rootless-podman-service-etc): new variable; (rootless-podman-service-type): new variable. * gnu/local.mk: Test it. * gnu/local.mk: Add them. * doc/guix.texi (Miscellaneous Services): Document it. Change-Id: I041496474c1027da353bd6852f2554a065914d7a Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi
2024-12-09tests: Adjust for new return value of ‘start-service’....In Shepherd 1.0, the “running value” of processes is no longer a plain integer; instead, it is a (process …) sexp. This commit adjusts tests to this change in a way that works both for 1.0 and for previous versions. * gnu/tests/databases.scm (run-memcached-test) (run-mysql-test): Don’t expect PID to be a number. * gnu/tests/docker.scm (run-docker-test) (run-docker-system-test, run-oci-container-test): Likewise. * gnu/tests/guix.scm (run-guix-build-coordinator-test) (run-guix-data-service-test, run-nar-herder-test) (run-bffe-test): Likewise. * gnu/tests/ldap.scm (run-ldap-test): Likewise. * gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test): Likewise. * gnu/tests/virtualization.scm (run-libvirt-test) (run-qemu-guest-agent-test, run-childhurd-test): Likewise. * gnu/tests/web.scm (run-webserver-test, run-php-fpm-test) (run-hpcguix-web-server-test, run-patchwork-test) (run-agate-test): Likewise * gnu/tests/ssh.scm (run-ssh-test): Accept a number, an ‘inetd-service’ sexp, or a ‘process’ sexp. Change-Id: I8c7a37a981f0788780fbc33752a38e7f9a026437 Ludovic Courtès