]>
Commit | Line | Data |
---|---|---|
b37bf2e1 A |
1 | /** |
2 | File Name: lexical-040.js | |
3 | Corresponds To: 7.5-2.js | |
4 | ECMA Section: 7.5 Identifiers | |
5 | Description: Identifiers are of unlimited length | |
6 | - can contain letters, a decimal digit, _, or $ | |
7 | - the first character cannot be a decimal digit | |
8 | - identifiers are case sensitive | |
9 | ||
10 | Author: christine@netscape.com | |
11 | Date: 11 september 1997 | |
12 | */ | |
13 | var SECTION = "lexical-040"; | |
14 | var VERSION = "JS1_4"; | |
15 | var TITLE = "Identifiers"; | |
16 | ||
17 | startTest(); | |
18 | writeHeaderToLog( SECTION + " "+ TITLE); | |
19 | ||
20 | var tc = 0; | |
21 | var testcases = new Array(); | |
22 | ||
23 | var result = "Failed"; | |
24 | var exception = "No exception thrown"; | |
25 | var expect = "Passed"; | |
26 | ||
27 | try { | |
28 | eval("var 1abc;"); | |
29 | } catch ( e ) { | |
30 | result = expect; | |
31 | exception = e.toString(); | |
32 | } | |
33 | ||
34 | testcases[tc++] = new TestCase( | |
35 | SECTION, | |
36 | "var 1abc" + | |
37 | " (threw " + exception +")", | |
38 | expect, | |
39 | result ); | |
40 | ||
41 | test(); | |
42 | ||
43 |