aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-269.js
blob: 2adc50177e3ef025f9856dac3f88567ebd1d5a3e (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
issue_269_1: {
    options = {
        unsafe: true,
    }
    input: {
        var x = {};
        console.log(
            String(x),
            Number(x),
            Boolean(x),

            String(),
            Number(),
            Boolean()
        );
    }
    expect: {
        var x = {};
        console.log(
            x + "", +x, !!x,
            "", 0, false
        );
    }
    expect_stdout: true
}

issue_269_dangers: {
    options = {
        unsafe: true,
    }
    input: {
        var x = {};
        console.log(
            String(x, x),
            Number(x, x),
            Boolean(x, x)
        );
    }
    expect: {
        var x = {};
        console.log(String(x, x), Number(x, x), Boolean(x, x));
    }
    expect_stdout: true
}

issue_269_in_scope: {
    options = {
        unsafe: true,
    }
    input: {
        var String, Number, Boolean;
        var x = {};
        console.log(
            String(x),
            Number(x, x),
            Boolean(x)
        );
    }
    expect: {
        var String, Number, Boolean;
        var x = {};
        console.log(String(x), Number(x, x), Boolean(x));
    }
    expect_stdout: true
}

strings_concat: {
    options = {
        strings: true,
        unsafe: true,
    }
    input: {
        var x = {};
        console.log(
            String(x + "str"),
            String("str" + x)
        );
    }
    expect: {
        var x = {};
        console.log(
            x + "str",
            "str" + x
        );
    }
    expect_stdout: true
}

regexp: {
    options = {
        evaluate: true,
        unsafe: true,
    }
    input: {
        RegExp("foo");
        RegExp("bar", "ig");
        RegExp(foo);
        RegExp("bar", ig);
        RegExp("should", "fail");
    }
    expect: {
        /foo/;
        /bar/ig;
        RegExp(foo);
        RegExp("bar", ig);
        RegExp("should", "fail");
    }
    expect_warnings: [
        'WARN: Error converting RegExp("should","fail") [test/compress/issue-269.js:5,8]',
    ]
}
el tests....* gnu/packages/gnunet.scm (libmicrohttpd)[arguments]: Don't disable parallel tests. Efraim Flashner 2019-03-07gnu: libmicrohttpd: Update to 0.9.63....* gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.63. [arguments]: Remove custom phase to add missing LDFLAGS. Efraim Flashner 2019-01-16gnu: gnurl: Add properties for updater....* gnu/packages/gnunet.scm (gnurl)[properties]: New field. Efraim Flashner 2019-01-16gnu: Move sqlite to separate module....* gnu/packages/databases.scm (sqlite, sqlite-3.26.0, sqlite-with-fts5, sqlite-with-column-metadata): Move variables from here... * gnu/packages/sqlite.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/apl.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/code.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/dc.scm, gnu/packages/disk.scm, gnu/packages/ebook.scm, gnu/packages/education.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/file-systems.scm, gnu/packages/freedesktop.scm, gnu/packages/ftp.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gps.scm, gnu/packages/guile.scm, gnu/packages/ibus.scm, gnu/packages/kerberos.scm, gnu/packages/kodi.scm, gnu/packages/lisp.scm, gnu/packages/mail.scm, gnu/packages/messaging.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nfs.scm, gnu/packages/ocaml.scm, gnu/packages/package-management.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/php.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/scheme.scm, gnu/packages/sync.scm, gnu/packages/syndication.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/web-browsers.scm, gnu/packages/webkit.scm: Adjust module references. Ricardo Wurmus 2019-01-14gnu: gnurl: Update to 7.63.0....* gnu/packages/gnunet.scm (gnurl): Update to 7.63.0. Efraim Flashner 2019-01-04gnu: guile-gnunet: Update to 0.0-1.d12167a....* gnu/packages/gnunet.scm (guile-gnunet): Update to 0.0-1.d12167a. [version]: Use git-version. [source]: Use git-file-name. Alex Vong 2019-01-04gnu: libmicrohttpd: Update to 0.9.62....* gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.62. Alex Vong 2019-01-04gnu: libextractor: Fix CVE-2018-{20430,20431}....* gnu/packages/patches/libextractor-CVE-2018-20430.patch, gnu/packages/patches/libextractor-CVE-2018-20431.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/gnunet.scm (libextractor)[source]: Use them. Alex Vong 2019-01-04gnu: libextractor: Update to 1.8....* gnu/packages/gnunet.scm (libextractor): Update to 1.8. Alex Vong 2018-11-29gnu: gnurl: Update to 7.62.0....* gnu/packages/gnunet.scm: Update to 7.62.0. Signed-off-by: ng0 <ng0@n0.is> Signed-off-by: Marius Bakke <mbakke@fastmail.com> ng0 2018-09-12gnu: gnurl: Update to 7.61.1....* gnu/packages/gnunet.scm (gnurl): Update to 7.61.1. Signed-off-by: Leo Famulari <leo@famulari.name> Nils Gillmann 2018-08-06gnu: gnurl: Update to 7.61.0....* gnu/packages/gnunet.scm (gnurl): Update to 7.61.0. Nils Gillmann 2018-07-18gnu: libextractor: Update to 1.7....* gnu/packages/gnunet.scm (libextractor): Update to 1.7. Marius Bakke 2018-05-27Merge branch 'master' into core-updatesMark H Weaver 2018-05-24gnu: gnurl: Update to 7.60.0....* gnu/packages/gnunet.scm (gnurl): Update to 7.60.0. Signed-off-by: Leo Famulari <leo@famulari.name> Nils Gillmann 2018-04-30Merge branch 'master' into core-updatesMark H Weaver 2018-04-23gnu: ffmpeg: Update to 4.0....* gnu/packages/video.scm (ffmpeg): Update to 4.0. * gnu/packages/video.scm (ffmpeg@3.4): New variable. * gnu/packages/video.scm (ffmpeg-git): Remove variable. * gnu/packages/video.scm (mpv)[inputs]: Build with ffmpeg instead of ffmpeg-git. * gnu/packages/gstreamer.scm (gst-libav)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. * gnu/packages/messaging.scm (qtox)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. * gnu/packages/emulators.scm (dolphin-emu)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. * gnu/packages/gnunet.scm (libextractor)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. Rutger Helling 2018-04-10Merge branch 'master' into core-updatesMark H Weaver 2018-04-08gnu: gnurl: Update to version 7.59.0....* gnu/packages/gnunet.scm (gnurl): Update to version 7.59.0. [source]: Add temporary second source at ftp.n0.is. Signed-off-by: Nils Gillmann <ng0@n0.is> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Nils Gillmann 2018-03-20Merge branch 'master' into core-updatesMark H Weaver 2018-03-20Correct name and Email for ng0....* .mailmap: Correct name and Email for ng0. * Makefile.am, doc/guix.texi, etc/completion/fish/guix.fish gnu/packages/accessibility.scm, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/cinnamon.scm, gnu/packages/compression.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/emacs.scm, gnu/packages/enlightenment.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile.scm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> ng0