1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_2/function/regexparg-2-n.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 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: regexparg-1.js 1.13 + Description: 1.14 + 1.15 + Regression test for 1.16 + http://scopus/bugsplat/show_bug.cgi?id=122787 1.17 + Passing a regular expression as the first constructor argument fails 1.18 + 1.19 + Author: christine@netscape.com 1.20 + Date: 15 June 1998 1.21 +*/ 1.22 + 1.23 +var SECTION = "JS_1.2"; 1.24 +var VERSION = "JS_1.2"; 1.25 +startTest(); 1.26 +var TITLE = "The variable statement"; 1.27 + 1.28 +writeHeaderToLog( SECTION + " "+ TITLE); 1.29 + 1.30 +function f(x) {return x;} 1.31 + 1.32 +x = f(/abc/); 1.33 + 1.34 +DESCRIPTION = "function f(x) {return x;}; x = f(/abc/); x()"; 1.35 +EXPECTED = "error"; 1.36 + 1.37 +new TestCase( SECTION, 1.38 + "function f(x) {return x;}; x = f(/abc/); x()", 1.39 + "error", 1.40 + x() ); 1.41 + 1.42 +test(); 1.43 +