initial import
[vuplus_webkit] / Source / JavaScriptCore / tests / mozilla / ecma_2 / Exceptions / lexical-048.js
1  /**
2     File Name:          lexical-048.js
3     Corresponds To:     7.8.1-1.js
4     ECMA Section:       7.8.1 Rules of Automatic Semicolon Insertion
5     Description:
6     Author:             christine@netscape.com
7     Date:               15 september 1997
8 */
9
10     var SECTION = "lexical-048";
11     var VERSION = "JS1_4";
12     var TITLE   = "The Rules of Automatic Semicolon Insertion";
13
14     startTest();
15     writeHeaderToLog( SECTION + " "+ TITLE);
16
17     var tc = 0;
18     var testcases = new Array();
19
20     var result = "Failed";
21     var exception = "No exception thrown";
22     var expect = "Passed";
23
24     try {
25         var counter = 0;
26         eval( "for ( counter = 0;\ncounter <= 1\ncounter++ ) {\nresult += \": got inside for loop\")");
27     } catch ( e ) {
28         result = expect;
29         exception = e.toString();
30     }
31
32     testcases[tc++] = new TestCase(
33         SECTION,
34         "line breaks within a for expression" +
35         " (threw " + exception +")",
36         expect,
37         result );
38
39     test();
40
41