aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-1275.js
blob: 5d4f5b706eb28e9af2f5c35ad2e2032aa3fee7b4 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
string_plus_optimization: {
    options = {
        side_effects  : true,
        evaluate      : true,
        conditionals  : true,
        comparisons   : true,
        dead_code     : true,
        booleans      : true,
        unused        : true,
        if_return     : true,
        join_vars     : true,
        cascade       : true,
        hoist_funs    : true,
    };
    input: {
        function foo(anything) {
            function throwing_function() {
                throw "nope";
            }
            try {
                console.log('0' + throwing_function() ? "yes" : "no");
            } catch (ex) {
                console.log(ex);
            }
            console.log('0' + anything ? "yes" : "no");
            console.log(anything + '0' ? "Yes" : "No");
            console.log('' + anything);
            console.log(anything + '');
        }
        foo();
    }
    expect: {
        function foo(anything) {
            function throwing_function() {
                throw "nope";
            }
            try {
                console.log((throwing_function(), "yes"));
            } catch (ex) {
                console.log(ex);
            }
            console.log("yes");
            console.log("Yes");
            console.log('' + anything);
            console.log(anything + '');
        }
        foo();
    }
    expect_stdout: true
}
:06:36 +0100'>2021-11-06nls: Update translations....* po/doc/guix-cookbook.es.po: New file. * po/doc/local.mk: Add 'es' cookbook. * doc/local.mk: Add 'es' cookbook. Julien Lepiller 2021-10-17nls: Update translations.Julien Lepiller 2021-09-02nls: Update translations....* po/packages/it.po: New file. * po/packages/LINGUAS: Add `it'. * po/*/*.po: Update translations. Julien Lepiller 2021-08-04nls: Update translations....* po/doc/guix-cookbook.ru.po: New file. * po/doc/guix-cookbook.sk.po: New file. * po/*/*.po: Update translations. * doc/local.mk (COOKBOOK_LANGUAGES): Add ru and sk. (info_TEXINFOS): Add Russian and Slovak cookbooks. * po/doc/local.mk (DOC_COOKBOOK_PO_FILES): Add Russian and Slovak po files. Julien Lepiller 2021-05-10nls: Update translations.Maxim Cournoyer 2021-04-18nls: Add Portuguese (Brazil) translation of the manual.Julien Lepiller