Debian Codegraph @

rhino/testsrc/tests/ecma_3/Unicode/uc-003.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 var gTestfile = 'uc-003.js';
8
9 test();
10
11 function test()
12 {
13 enterFunc ("test");
14
15 var \u0041 = 5;
16 var A\u03B2 = 15;
17 var c\u0061se = 25;
18
19 printStatus ("Escapes in identifiers test.");
20 printBugNumber (23608);
21 printBugNumber (23607);
22
23 reportCompare (5, eval("\u0041"),
24 "Escaped ASCII Identifier test.");
25 reportCompare (6, eval("++\u0041"),
26 "Escaped ASCII Identifier test");
27 reportCompare (15, eval("A\u03B2"),
28 "Escaped non-ASCII Identifier test");
29 reportCompare (16, eval("++A\u03B2"),
30 "Escaped non-ASCII Identifier test");
31 reportCompare (25, eval("c\\u00" + "61se"),
32 "Escaped keyword Identifier test");
33 reportCompare (26, eval("++c\\u00" + "61se"),
34 "Escaped keyword Identifier test");
35
36 exitFunc ("test");
37 }