]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_3/RegExp/regress-98306.js
2 * The contents of this file are subject to the Netscape Public
3 * License Version 1.1 (the "License"); you may not use this file
4 * except in compliance with the License. You may obtain a copy of
5 * the License at http://www.mozilla.org/NPL/
7 * Software distributed under the License is distributed on an "AS IS"
8 * basis, WITHOUT WARRANTY OF ANY KIND, either expressed
9 * or implied. See the License for the specific language governing
10 * rights and limitations under the License.
12 * The Original Code is mozilla.org code.
14 * The Initial Developer of the Original Code is Netscape
15 * Communications Corporation. Portions created by Netscape are
16 * Copyright (C) 1998 Netscape Communications Corporation.
17 * All Rights Reserved.
19 * Contributor(s): jrgm@netscape.com, pschwartau@netscape.com
20 * Date: 04 September 2001
22 * SUMMARY: Regression test for Bugzilla bug 98306
23 * "JS parser crashes in ParseAtom for script using Regexp()"
25 * See http://bugzilla.mozilla.org/show_bug.cgi?id=98306
27 //-----------------------------------------------------------------------------
29 var summary
= "Testing that we don't crash on this code -";
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
44 printStatus (summary
);
46 s
= '"Hello".match(/[/]/)';
62 // Try to provoke a crash -
63 function tryThis(sCode
)
65 // sometimes more than one attempt is necessary -
66 for (var i
=0; i
<cnUBOUND
; i
++)
74 // do nothing; keep going -