michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributor: Bob Clary michael@0: */ michael@0: michael@0: /** michael@0: * File Name: regress-10278.js michael@0: * Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=10278 michael@0: * Description: Function declarations do not need to be separated michael@0: * by semi-colon if they occur on the same line. michael@0: * Author: bob@bclary.com michael@0: */ michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 10278; michael@0: var summary = 'Function declarations do not need to be separated by semi-colon'; michael@0: var actual; michael@0: var expect; michael@0: michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: test(); michael@0: //----------------------------------------------------------------------------- michael@0: michael@0: function test() michael@0: { michael@0: enterFunc ('test'); michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus (summary); michael@0: michael@0: expect = 'pass'; michael@0: try michael@0: { michael@0: eval("function f(){}function g(){}"); michael@0: actual = "pass"; michael@0: printStatus('no exception thrown'); michael@0: } michael@0: catch ( e ) michael@0: { michael@0: actual = "fail"; michael@0: printStatus('exception ' + e.toString() + ' thrown'); michael@0: } michael@0: michael@0: reportCompare(expect, actual, summary); michael@0: michael@0: exitFunc ('test'); michael@0: }