From ed10eb78502ee532c72e1c8b8bf22c37ee6567e6 Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Wed, 5 Sep 2001 23:21:33 +0000 Subject: [PATCH] Completely rethinking this testcase. Reduced test as much as possible, added try...catch blocks and for-loop to stress-test the code. --- js/tests/ecma_3/RegExp/regress-98306.js | 99 ++++++------------------- 1 file changed, 23 insertions(+), 76 deletions(-) diff --git a/js/tests/ecma_3/RegExp/regress-98306.js b/js/tests/ecma_3/RegExp/regress-98306.js index d27936166a11..2324fc7f48bd 100644 --- a/js/tests/ecma_3/RegExp/regress-98306.js +++ b/js/tests/ecma_3/RegExp/regress-98306.js @@ -19,24 +19,17 @@ * Contributor(s): jrgm@netscape.com, pschwartau@netscape.com * Date: 04 September 2001 * -* SUMMARY: Regression test for Bugzilla bug 98306: +* SUMMARY: Regression test for Bugzilla bug 98306 * "JS parser crashes in ParseAtom for script using Regexp()" * * See http://bugzilla.mozilla.org/show_bug.cgi?id=98306 -* As noted there, we could generate this crash with just one line: -* -* "Hello".match(/[/]/); -* -* However, we include the longer testcase as originally reported - */ //----------------------------------------------------------------------------- var bug = 98306; var summary = "Testing that we don't crash on this code -"; -var cnUSERAGENT = 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.3+) Gecko/20010828'; var cnUBOUND = 10; -var obj; var re; - +var s; //----------------------------------------------------------------------------- @@ -51,81 +44,35 @@ function test() printBugNumber (bug); printStatus (summary); - // Sometimes it was necessary to try these more than once to crash - for (var i=0; i