]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/lexical-002.js
2 File Name: lexical-002.js
3 Corresponds To: ecma/LexicalConventions/7.2-3-n.js
4 ECMA Section: 7.2 Line Terminators
5 Description: - readability
7 - may occur between any two tokens
8 - cannot occur within any token, not even a string
9 - affect the process of automatic semicolon insertion.
11 white space characters are:
12 unicode name formal name string representation
13 \u000A line feed <LF> \n
14 \u000D carriage return <CR> \r
16 this test uses onerror to capture line numbers. because
17 we use on error, we can only have one test case per file.
19 Author: christine@netscape.com
20 Date: 11 september 1997
22 var SECTION
= "lexical-002";
23 var VERSION
= "JS1_4";
24 var TITLE
= "Line Terminators";
27 writeHeaderToLog( SECTION
+ " "+ TITLE
);
30 var testcases
= new Array();
32 var result
= "Failed";
33 var exception
= "No exception thrown";
34 var expect
= "Passed";
37 result
= eval("\r\n\expect");
39 exception
= e
.toString();
42 testcases
[tc
++] = new TestCase(
44 "result=eval(\"\r\nexpect\")" +
45 " (threw " + exception
+")",