aboutsummaryrefslogtreecommitdiff
mangle: {
    mangle = {
        toplevel: true,
    }
    input: {
        var e = eval, x = 42;
        (function() {
            console.log(e("typeof x"));
        })();
    }
    expect: {
        var e = eval, x = 42;
        (function() {
            console.log(e("typeof x"));
        })();
    }
    expect_stdout: true
}

compress: {
    options = {
        collapse_vars: true,
        inline: true,
        unused: true,
    }
    input: {
        console.log(function() {
            var a = 42;
            return eval("typeof a");
        }(), function(e) {
            var a = null;
            return e("typeof a");
        }(eval), function(eval) {
            var a = false;
            return eval("typeof a");
        }(eval), function(f) {
            var a = "STRING";
            var eval = f;
            return eval("typeof a");
        }(eval), function(g) {
            var a = eval;
            function eval() {
                return g;
            }
            return eval()("typeof a");
        }(eval));
    }
    expect: {
        console.log(function() {
            var a = 42;
            return eval("typeof a");
        }(), (0, eval)("typeof a"), function(eval) {
            var a = false;
            return eval("typeof a");
        }(eval), function(f) {
            var a = "STRING";
            var eval = f;
            return eval("typeof a");
        }(eval), function(g) {
            var a = eval;
            function eval() {
                return g;
            }
            return eval()("typeof a");
        }(eval));
    }
    expect_stdout: "number undefined boolean string undefined"
}

call_arg_1: {
    mangle = {
        toplevel: true,
    }
    input: {
        var z = "foo";
        (function() {
            var z = false;
            (function(e) {
                var z = 42;
                e("console.log(typeof z)");
            })(eval);
        })();
    }
    expect: {
        var z = "foo";
        (function() {
            var o = false;
            (function(o) {
                var a = 42;
                o("console.log(typeof z)");
            })(eval);
        })();
    }
    expect_stdout: true
}

call_arg_2: {
    mangle = {
        toplevel: true,
    }
    input: {
        function eval() {
            console.log("PASS");
        }
        var z = "foo";
        (function() {
            var z = false;
            (function(e) {
                var z = 42;
                e("console.log(typeof z)");
            })(eval);
        })();
    }
    expect: {
        function n() {
            console.log("PASS");
        }
        var o = "foo";
        (function() {
            var o = false;
            (function(o) {
                var n = 42;
                o("console.log(typeof z)");
            })(n);
        })();
    }
    expect_stdout: "PASS"
}
'>* gnu/services/admin.scm (%rotated-files): Add "/var/log/debug". Ludovic Courtès 2017-11-05services: Add 'description' fields....* gnu/services/admin.scm (rottlog-service-type) (tailon-service-type): Add 'description' field. * gnu/services/audio.scm (mpd-service-type): Likewise. * gnu/services/avahi.scm (avahi-service-type): Likewise. * gnu/services/ssh.scm (lsh-service-type) (openssh-service-type, dropbear-service-type): Likewise. Ludovic Courtès 2017-08-09services: admin: Simplify the handling of the Tailon debug? option....* gnu/services/admin.scm (tailon-configuration-file-compiler): Simplify the handling of debug?. Christopher Baines 2017-08-09services: Update the Tailon service for Tailon 1.3.0....Tailon 1.3.0 (upgraded from 1.1.1) adds support for HTTP authentication. * gnu/services/admin.scm (<tailon-configuration-file>): Add http-auth and users configuration values. (tailon-configuration-file-http-auth, tailon-configuration-file-users): New procedures. (tailon-configuration-file-compiler): Add support for the http-auth and users configuration options. * doc/guix.texi (Monitoring Services): Document authentication for Tailon. Christopher Baines 2017-08-09services: Add missing wrap-lines option to tailon....* gnu/services/admin.scm (<tailon-configuration-file>): Add wrap-lines. (tailon-configuration-wrap-lines): New procedure. (tailon-configuration-file-compiler): Add support for wrap-lines. * doc/guix.texi (Monitoring Services): Document the wrap-lines Tailon configuration option. Christopher Baines 2017-07-29gnu: services: admin: Add tailon....* gnu/services/admin.scm (<tailon-configuration>, <tailon-configuration-file>): New record types. (tailon-configuration-files-string, tailon-shepherd-service): New procedures. (%tailon-accounts, tailon-service-type: New variables. * doc/guix.texi (Monitoring Services: Document the Tailon service. * gnu/local.mk (GNU_SYSTEM_MODULES): Add gnu/tests/admin.scm. * gnu/tests/admin.scm: New file. Christopher Baines 2017-06-12services: rottlog: Make extensible....* gnu/services/admin.scm (rottlog-service-type)[compose, extend]: New fields. * doc/guix.texi (Log Rotation): Mention extension. Ludovic Courtès 2017-06-12services: rottlog: Define <log-rotation> objects....* gnu/services/admin.scm (<log-rotation>): New record type. (syslog-rotation-config, simple-rotation-config): Remove. (%default-rotations): Define as a list of <log-rotation> objects. (log-rotation->config, log-rotations->/etc-entries): New procedures. (<rottlog-configuration>)[periodic-rotations]: Remove. [rotations]: New field. (rottlog-etc): Use 'log-rotations->/etc-entries'. * doc/guix.texi (Log Rotation): Update accordingly. Ludovic Courtès 2017-04-16services: Add a default value to various service types....* gnu/services/admin.scm (rottlog-service-type)[default-value]: New field. * gnu/services/base.scm (guix-service-type)[default-value]: New field. (guix-publish-service-type)[default-value]: New field. * gnu/services/cups.scm (cups-service-type)[default-value]: New field. * gnu/services/dict.scm (dicod-service-type)[default-value]: New field. * gnu/services/mcron.scm (mcron-service-type)[default-value]: New field. * gnu/services/networking.scm (<tor-configuration>)[config-file]: Add default value. (tor-service-type)[default-value]: New field. (<bitlbee-configuration>)[interface, port, extra-settings]: Add default values. (bitlbee-service-type)[default-value]: New field. (wpa-supplicant-service-type)[default-value]: New field. (tlp-service-type)[default-value]: New field. (openssh-service-type)[default-value]: New field. * doc/guix.texi (Base Services, Log Rotation) (Networking Services, Printing Services): (Power management Services): Adjust examples accordingly. Ludovic Courtès 2016-12-19services: guix: Add 'log-file' configuration option....* gnu/services/base.scm (<guix-configuration>)[log-file]: New field. (guix-shepherd-service): Pass #:log-file to 'make-forkexec-constructor'. * gnu/services/admin.scm (simple-rotation-config): Take a list of files and join them with commas. (%default-rotations): Add /var/log/guix-daemon.log. * doc/guix.texi (Base Services): Document it. Ludovic Courtès 2016-10-03services: rottlog: Add Rottlog to the global profile....* gnu/services/admin.scm (rottlog-service-type): Extend PROFILE-SERVICE-TYPE. Ludovic Courtès 2016-10-03services: rottlog: Improve default weekly rotations....* gnu/services/admin.scm (%rotated-files): Add "/var/log/maillog". (syslog-rotation-config): Change parameter to 'files'. Return a string-append gexp for all of FILES. (simple-rotation-config): Remove unnecessary 'postrotate' and 'endscript'. (%default-rotations): Adjust accordingly. Ludovic Courtès 2016-10-03services: Add rottlog....* gnu/services/admin.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Log Rotation): New node. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Jan Nieuwenhuizen