Files
palemoon27/js/src/tests/js1_5/String/replace-flags.js
T
roytam1 4a37a0ce80 import change from rmottola/Arctic-Fox:
- Bug 1130439 - Trigger compacting GCs after the user becomes inactive (aa5936222)
- Bug 1139429 - Fix ICU configuration for SunOS/OpenSolaris. (a0e4467b4)
- Bug 1143521 - Remove IsPoisonedPtr stuff (341899b88)
- Bug 1142351 - Part 1: Collect telemetry about deprecated flag argument for String.prototype.{search,match,replace}. (3ad712689) (partly)
- Bug 1142351 - Part 2: Warn about deprecated flag argument for String.prototype (66c280d79)
- Bug 1083498 - Remove SpiderMonkey's nonstandard behavior for destructuring for..in loops in JS1.7. (428b6a0d1)
2019-05-17 23:28:53 +08:00

16 lines
587 B
JavaScript

// |reftest| skip-if(!xulRuntime.shell)
var BUGNUMBER = 1142351;
var summary = 'Add console warnings for non-standard flag argument of String.prototype.{search,match,replace}.';
printBugNumber(BUGNUMBER);
printStatus (summary);
options("werror");
assertEq(evaluate("'aaaA'.match('a', 'i')", {catchTermination: true}), "terminated");
assertEq(evaluate("'aaaA'.search('a', 'i')", {catchTermination: true}), "terminated");
assertEq(evaluate("'aaaA'.replace('a', 'b', 'g')", {catchTermination: true}), "terminated");
if (typeof reportCompare === "function")
reportCompare(true, true);