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