aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/number-literal.js
blob: f4e2f5dd01b7eb007ece77b38a03178271d7e0f4 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var assert = require("assert");
var uglify = require("../node");

describe("Number literals", function () {
    it("Should not allow legacy octal literals in strict mode", function() {
        var inputs = [
            '"use strict";00;',
            '"use strict"; var foo = 00;'
        ];

        var test = function(input) {
            return function() {
                uglify.parse(input);
            }
        }
        var error = function(e) {
            return e instanceof uglify.JS_Parse_Error &&
                e.message === "Legacy octal literals are not allowed in strict mode";
        }
        for (var i = 0; i < inputs.length; i++) {
            assert.throws(test(inputs[i]), error, inputs[i]);
        }
    });
});
r>2020-06-19hurd-boot: Create individual translators instead of running MAKEDEV....* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Do not create dev/{null,zero,full,random,urandom} mount points. (passive-translator-xattr?, passive-translator-installed?, translated?, set-translator, set-hurd-device-translators): New procedures. (false-if-EEXIST): New macro. (boot-hurd-system): Use them instead of running MAKEDEV. Jan (janneke) Nieuwenhuizen 2020-06-08gnu: services: Add %hurd-startup-service....This decouples startup of the Hurd from the "hurd" package, moving the RC script into SYSTEM. * gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script. [arguments]: Do not substitute it. Update "runsystem.sh" to parse kernel arguments and exec into --system=SYSTEM/rc. (hurd-rc-script): Move to... * gnu/services.scm (%hurd-rc-file): ...this new variable. (hurd-rc-entry): New procedure. (%hurd-startup-service): Use it in new variable. * gnu/system.scm (hurd-default-essential-services): Use it. Jan (janneke) Nieuwenhuizen 2020-06-08hurd-boot: Further cleanup of "rc"....* gnu/packages/hurd.scm (hurd-rc-script): Move implementation to ... * gnu/build/hurd-boot.scm (boot-hurd-system): ...here, new file. * gnu/build/linux-boot.scm (make-hurd-device-nodes): Move there likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Jan (janneke) Nieuwenhuizen