1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_3/regress/function-001-n.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +// |reftest| skip -- obsolete test 1.5 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 + 1.11 +/** 1.12 + * File Name: boolean-001.js 1.13 + * Description: 1.14 + * 1.15 + * http://scopus.mcom.com/bugsplat/show_bug.cgi?id=99232 1.16 + * 1.17 + * eval("function f(){}function g(){}") at top level is an error for JS1.2 1.18 + * and above (missing ; between named function expressions), but declares f 1.19 + * and g as functions below 1.2. 1.20 + * 1.21 + * Fails to produce error regardless of version: 1.22 + * js> version(100) 1.23 + * 120 1.24 + * js> eval("function f(){}function g(){}") 1.25 + * js> version(120); 1.26 + * 100 1.27 + * js> eval("function f(){}function g(){}") 1.28 + * js> 1.29 + * Author: christine@netscape.com 1.30 + * Date: 11 August 1998 1.31 + */ 1.32 +var SECTION = "function-001.js"; 1.33 +var VERSION = "JS_1.3"; 1.34 +var TITLE = "functions not separated by semicolons are errors in version 120 and higher"; 1.35 +var BUGNUMBER="10278"; 1.36 + 1.37 +startTest(); 1.38 +writeHeaderToLog( SECTION + " "+ TITLE); 1.39 + 1.40 +new TestCase( 1.41 + SECTION, 1.42 + "eval(\"function f(){}function g(){}\")", 1.43 + "error", 1.44 + eval("function f(){}function g(){}") ); 1.45 + 1.46 +test(); 1.47 + 1.48 +