js/src/tests/js1_5/Regress/regress-10278.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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  */
     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;
    22 //-----------------------------------------------------------------------------
    23 test();
    24 //-----------------------------------------------------------------------------
    26 function test()
    27 {
    28   enterFunc ('test');
    29   printBugNumber(BUGNUMBER);
    30   printStatus (summary);
    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   }
    45   reportCompare(expect, actual, summary);
    47   exitFunc ('test');
    48 }

mercurial