aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/accessorTokens-1492.js
blob: 861414eea8ca421fe098cb59a60c12d15291d151 (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
var UglifyJS = require('../../');
var assert = require("assert");

describe("Accessor tokens", function() {
    it("Should fill the token information for accessors (issue #1492)", function() {
        // location               0         1         2         3         4
        //                        01234567890123456789012345678901234567890123456789
        var ast = UglifyJS.parse("var obj = { get latest() { return undefined; } }");

        // test all AST_ObjectProperty tokens are set as expected
        var checkedAST_ObjectProperty = false;
        var checkWalker = new UglifyJS.TreeWalker(function(node, descend) {
            if (node instanceof UglifyJS.AST_ObjectProperty) {
                checkedAST_ObjectProperty = true;

                assert.equal(node.start.pos, 12);
                assert.equal(node.end.endpos, 46);

                assert(node.key instanceof UglifyJS.AST_SymbolRef);
                assert.equal(node.key.start.pos, 16);
                assert.equal(node.key.end.endpos, 22);

                assert(node.value instanceof UglifyJS.AST_Accessor);
                assert.equal(node.value.start.pos, 22);
                assert.equal(node.value.end.endpos, 46);

            }
        });
        ast.walk(checkWalker);
        assert(checkedAST_ObjectProperty, "AST_ObjectProperty not found");
    });
});
oc/guix-manual.fa.po: New file. * po/doc/local.mk (DOC_PO_FILES, DOC_COOKBOOK_PO_FILES): Add them. * doc/local.mk (info_TEXINFOS): Add them. Julien Lepiller 2021-04-18nls: Add Slovak translation....* po/packages/sk.po: New file. * po/packages/LINGUAS: Add 'sk'. * po/doc/guix-manual.sk.po: New file. * doc/local.mk (info_TEXINFOS): Add it. * po/doc/local.mk (DOC_PO_FILES): Add it. Julien Lepiller 2021-04-18nls: Update 'pt_BR' translation.Julien Lepiller 2021-04-18nls: Remove Vietnamese translations of packages....No translated string is used in Guix anymore. Julien Lepiller 2021-04-18nls: Update 'zh_CN' translations.Julien Lepiller 2021-04-18nls: Update 'sr' translations.Julien Lepiller 2021-04-18nls: Update 'pl' translations.Julien Lepiller 2021-04-18nls: Update 'hu' translations.Julien Lepiller 2021-04-18nls: Update 'da' translations.Julien Lepiller 2021-04-18nls: Update 'eo' translations.Julien Lepiller 2021-04-18nls: Update 'es' translations.Julien Lepiller 2021-04-18nls: Update 'de' translations.Julien Lepiller 2021-04-18nls: Update 'fr' translations.Julien Lepiller 2021-02-12services: Add transmission-daemon service....* gnu/services/file-sharing.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * po/packages/POTFILES.in: Add it. * tests/services/file-sharing.scm: New file. * Makefile.am (SCM_TESTS): Add it. * doc/guix.texi (File-Sharing Services): New section. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Simon South 2021-01-28nls: Update 'fr' translation.Julien Lepiller 2020-11-12nls: Update string translations.Ludovic Courtès 2020-10-27nls: Update.Ludovic Courtès 2020-10-16nls: Update.Ludovic Courtès 2020-09-29nls: Fix copyright and bug address in pot files....* po/guix/Makevars: Fix COPYRIGHT_HOLDER and MSGID_BUGS_ADDRESS. * po/packages/Makevars: idem. Julien Lepiller 2020-04-14nls: Update.Ludovic Courtès 2020-04-12nls: Update.Ludovic Courtès 2020-03-23nls: Update.Ludovic Courtès 2019-05-13nls: Update 'fr' translation.Julien Lepiller 2019-05-03nls: Update da translations.Ludovic Courtès 2019-05-01nls: Update translations for de and fr.Ludovic Courtès 2019-04-25nls: Update 'es' translation.Julien Lepiller 2019-04-25nls: Update 'fr' translation.Julien Lepiller 2019-04-13nls: Update 'fr' translation.Julien Lepiller 2019-02-13nls: Update 'de' translation.Julien Lepiller 2019-02-13nls: Update 'da' translation.Julien Lepiller 2018-12-02nls: Update 'fr' translation.Julien Lepiller 2018-06-23nls: Update 'fr' translation.Julien Lepiller