|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* |
|
3 * Any copyright is dedicated to the Public Domain. |
|
4 * http://creativecommons.org/licenses/publicdomain/ |
|
5 * Contributor: Bob Clary |
|
6 */ |
|
7 |
|
8 /** |
|
9 * File Name: regress-10278.js |
|
10 * Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=10278 |
|
11 * Description: Function declarations do not need to be separated |
|
12 * by semi-colon if they occur on the same line. |
|
13 * Author: bob@bclary.com |
|
14 */ |
|
15 //----------------------------------------------------------------------------- |
|
16 var BUGNUMBER = 10278; |
|
17 var summary = 'Function declarations do not need to be separated by semi-colon'; |
|
18 var actual; |
|
19 var expect; |
|
20 |
|
21 |
|
22 //----------------------------------------------------------------------------- |
|
23 test(); |
|
24 //----------------------------------------------------------------------------- |
|
25 |
|
26 function test() |
|
27 { |
|
28 enterFunc ('test'); |
|
29 printBugNumber(BUGNUMBER); |
|
30 printStatus (summary); |
|
31 |
|
32 expect = 'pass'; |
|
33 try |
|
34 { |
|
35 eval("function f(){}function g(){}"); |
|
36 actual = "pass"; |
|
37 printStatus('no exception thrown'); |
|
38 } |
|
39 catch ( e ) |
|
40 { |
|
41 actual = "fail"; |
|
42 printStatus('exception ' + e.toString() + ' thrown'); |
|
43 } |
|
44 |
|
45 reportCompare(expect, actual, summary); |
|
46 |
|
47 exitFunc ('test'); |
|
48 } |