From e5902aae86c8a32fffa0db59ce209a2e7e6568ca Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Mon, 13 Aug 2001 19:38:18 +0000 Subject: [PATCH] Adding new case to the test. git-svn-id: svn://10.0.0.236/trunk@100923 18797224-902f-48f8-a5cc-f745e15eee43 --- .../tests/ecma_3/Exceptions/regress-95101.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/mozilla/js/tests/ecma_3/Exceptions/regress-95101.js b/mozilla/js/tests/ecma_3/Exceptions/regress-95101.js index b014ab02e24..59b5209788b 100644 --- a/mozilla/js/tests/ecma_3/Exceptions/regress-95101.js +++ b/mozilla/js/tests/ecma_3/Exceptions/regress-95101.js @@ -36,19 +36,29 @@ var expect= ''; var expectedvalues = []; -status = 'Section 1 of test'; try { xxxyyyzzz(); } catch (e) { + status = 'Section 1 of test'; actual = e instanceof ReferenceError; -} -expect = true; -addThis(); + expect = true; + addThis(); + /* + * This test is more literal, and may one day be invalid. + * Searching for literal string "ReferenceError" in e.toString() + */ + status = 'Section 2 of test'; + var match = e.toString().search(/ReferenceError/); + actual = (match > -1); + expect = true; + addThis(); +} + //-----------------------------------------------------------------------------