2 File Name: lexical-001.js
3 CorrespondsTo: ecma/LexicalConventions/7.2.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-001";
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 "OBJECT = new Object; result = new OBJECT()" +
45 " (threw " + exception +")",