From f2d57e3ecea02d8990eb6b388533f2f74eb3a7e5 Mon Sep 17 00:00:00 2001 From: "nboyd%atg.com" Date: Wed, 18 Jul 2007 19:59:21 +0000 Subject: [PATCH] Fix bug 387694 - More reportMatch changes to generalize tests --- js/tests/js1_7/block/regress-348685.js | 4 ++-- js/tests/js1_7/block/regress-349507.js | 4 ++-- js/tests/js1_7/block/regress-350279.js | 4 ++-- js/tests/js1_7/block/regress-351497.js | 4 ++-- js/tests/js1_7/block/regress-352212.js | 4 ++-- js/tests/js1_7/block/regress-352609.js | 16 ++++++++-------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/js/tests/js1_7/block/regress-348685.js b/js/tests/js1_7/block/regress-348685.js index 747cf8c5c1a..72ffc085ece 100755 --- a/js/tests/js1_7/block/regress-348685.js +++ b/js/tests/js1_7/block/regress-348685.js @@ -64,7 +64,7 @@ function test() return i; } - expect = 'ReferenceError: i is not defined'; + expect = /ReferenceError: (i|"i") is not defined/; try { @@ -74,7 +74,7 @@ function test() { actual = ex + ''; } - reportCompare(expect, actual, summary); + reportMatch(expect, actual, summary); exitFunc ('test'); } diff --git a/js/tests/js1_7/block/regress-349507.js b/js/tests/js1_7/block/regress-349507.js index a1c4661d085..fc1d0c7cb5b 100755 --- a/js/tests/js1_7/block/regress-349507.js +++ b/js/tests/js1_7/block/regress-349507.js @@ -53,7 +53,7 @@ function test() printBugNumber(BUGNUMBER); printStatus (summary); - expect = 'TypeError: redeclaration of const b'; + expect = /TypeError: redeclaration of const b/; try { eval('(function() { let(x = 1) { const b = 2 }; let b = 3; })'); @@ -63,7 +63,7 @@ function test() actual = ex + ''; } - reportCompare(expect, actual, summary); + reportMatch(expect, actual, summary); exitFunc ('test'); } diff --git a/js/tests/js1_7/block/regress-350279.js b/js/tests/js1_7/block/regress-350279.js index d5d68a240ca..23bfb75ca80 100755 --- a/js/tests/js1_7/block/regress-350279.js +++ b/js/tests/js1_7/block/regress-350279.js @@ -53,7 +53,7 @@ function test() printBugNumber(BUGNUMBER); printStatus (summary); - expect = 'SyntaxError: invalid array comprehension left-hand side'; + expect = /SyntaxError: /; try { eval('let [2 for (x in [])] = 4;'); @@ -63,7 +63,7 @@ function test() actual = ex + ''; } - reportCompare(expect, actual, summary); + reportMatch(expect, actual, summary); exitFunc ('test'); } diff --git a/js/tests/js1_7/block/regress-351497.js b/js/tests/js1_7/block/regress-351497.js index d120eb199cc..edf3fbf3e8f 100755 --- a/js/tests/js1_7/block/regress-351497.js +++ b/js/tests/js1_7/block/regress-351497.js @@ -53,7 +53,7 @@ function test() printBugNumber(BUGNUMBER); printStatus (summary); - expect = 'SyntaxError: invalid for/in left-hand side'; + expect = /SyntaxError: (invalid for\/in left-hand side|missing variable name)/; try { eval('for(let (w) x in y) { }'); @@ -63,7 +63,7 @@ function test() actual = ex + ''; } - reportCompare(expect, actual, summary); + reportMatch(expect, actual, summary); exitFunc ('test'); } diff --git a/js/tests/js1_7/block/regress-352212.js b/js/tests/js1_7/block/regress-352212.js index a8aed48e564..e21848f0fd7 100755 --- a/js/tests/js1_7/block/regress-352212.js +++ b/js/tests/js1_7/block/regress-352212.js @@ -53,7 +53,7 @@ function test() printBugNumber(BUGNUMBER); printStatus (summary); - expect = 'TypeError: XML filtering predicate operator called on incompatible Number'; + expect = /TypeError: /; try { @@ -64,7 +64,7 @@ function test() actual = ex + ''; } - reportCompare(expect, actual, summary); + reportMatch(expect, actual, summary); exitFunc ('test'); } diff --git a/js/tests/js1_7/block/regress-352609.js b/js/tests/js1_7/block/regress-352609.js index ceb45f82e5f..c9a1a55b379 100755 --- a/js/tests/js1_7/block/regress-352609.js +++ b/js/tests/js1_7/block/regress-352609.js @@ -52,8 +52,8 @@ function test() enterFunc ('test'); printBugNumber(BUGNUMBER); printStatus (summary); - - expect = 'TypeError: 0 is not a function'; + + expect = /TypeError: 0 is not a function/; try { [let (x = 3, y = 4) x].map(0); @@ -62,9 +62,9 @@ function test() { actual = ex + ''; } - reportCompare(expect, actual, '[let (x = 3, y = 4) x].map(0)'); + reportMatch(expect, actual, '[let (x = 3, y = 4) x].map(0)'); - expect = 'TypeError: p.z = [let (x = 3, y = 4) x] is not a function'; + expect = /TypeError: (p.z = \[let \(x = 3, y = 4\) x\]|.*Array.*) is not a function/; try { var p = {}; (p.z = [let (x = 3, y = 4) x])(); @@ -73,18 +73,18 @@ function test() { actual = ex + ''; } - reportCompare(expect, actual, 'p = {}; (p.z = [let (x = 3, y = 4) x])()'); + reportMatch(expect, actual, 'p = {}; (p.z = [let (x = 3, y = 4) x])()'); - expect = 'TypeError: p.z = (let (x) x) is not a function'; + expect = /TypeError: (p.z = \(let \(x\) x\)|.*Undefined.*) is not a function/; try { var p = {}; (p.z = let(x) x)() - } + } catch(ex) { actual = ex + ''; } - reportCompare(expect, actual, 'p = {}; (p.z = let(x) x)()'); + reportMatch(expect, actual, 'p = {}; (p.z = let(x) x)()'); exitFunc ('test'); }