1/**
2    File Name:          lexical-001.js
3    CorrespondsTo:      ecma/LexicalConventions/7.2.js
4    ECMA Section:       7.2 Line Terminators
5    Description:        - readability
6                        - separate tokens
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.
10
11                        white space characters are:
12                        unicode     name            formal name     string representation
13                        \u000A      line feed       <LF>            \n
14                        \u000D      carriage return <CR>            \r
15
16                        this test uses onerror to capture line numbers.  because
17                        we use on error, we can only have one test case per file.
18
19    Author:             christine@netscape.com
20    Date:               11 september 1997
21*/
22    var SECTION = "lexical-001";
23    var VERSION = "JS1_4";
24    var TITLE   = "Line Terminators";
25
26    startTest();
27    writeHeaderToLog( SECTION + " "+ TITLE);
28
29    var tc = 0;
30    var testcases = new Array();
31
32    var result = "Failed";
33    var exception = "No exception thrown";
34    var expect = "Passed";
35
36    try {
37        result = eval("\r\n\expect");
38    } catch ( e ) {
39        exception = e.toString();
40    }
41
42    testcases[tc++] = new TestCase(
43        SECTION,
44        "OBJECT = new Object; result = new OBJECT()" +
45        " (threw " + exception +")",
46        expect,
47        result );
48
49    test();
50