blob: d06bfe7cdd28a9cba4950479ae7e1f0d1036a7b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
var BUGNUMBER = 1263118;
var summary = "RegExp.prototype[@@replace] with non-standard $+ substitution.";
print(BUGNUMBER + ": " + summary);
assertEq(/(a)(b)(c)/[Symbol.replace]("abc", "[$+]"), "[c]");
assertEq(/(a)(b)c/[Symbol.replace]("abc", "[$+]"), "[b]");
assertEq(/(a)bc/[Symbol.replace]("abc", "[$+]"), "[a]");
assertEq(/abc/[Symbol.replace]("abc", "[$+]"), "[]");
if (typeof reportCompare === "function")
reportCompare(true, true);
|