mirror of https://github.com/tc39/test262.git
add empty replace test
This commit is contained in:
parent
cb22dad417
commit
f7b15e18d4
|
@ -21,4 +21,6 @@ for (let flags of ["", "u", "g", "gu"]) {
|
|||
let re = new RegExp(source, flags);
|
||||
assert.throws(SyntaxError, () => "abcd".replace(re, "$<snd"),
|
||||
"unclosed named group in replacement should throw a SyntaxError");
|
||||
assert.throws(SyntaxError, () => "abcd".replace(re, "$<>"),
|
||||
"empty named group in replacement should throw a SyntaxError");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue