Invalid regexp literals should throw syntax error in ES11 (#4506)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
try {
|
||||
/?:/
|
||||
eval('/?:/');
|
||||
assert(false);
|
||||
} catch (e) {
|
||||
assert(e instanceof SyntaxError);
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
// limitations under the License.
|
||||
|
||||
try {
|
||||
/(?<=^abc)def/;
|
||||
eval('/(?<=^abc)def/');
|
||||
} catch(e) {
|
||||
assert(e instanceof SyntaxError);
|
||||
}
|
||||
|
||||
try {
|
||||
/(?a)/;
|
||||
eval('/(?a)/;')
|
||||
} catch(e) {
|
||||
assert(e instanceof SyntaxError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user