Remove ES_NEXT macro (#4915)
- remove all '#JERRY_ESNEXT' macro - remove 5.1 build profile, update test runner accordingly (Note: all builtins are turn on by default) - move tests from tests/jerry/esnext into tests/jerry, concatenate files with same names - add skiplist to some snapshot tests that were supported only in 5.1 - fix doxygen issues that were hidden before (bc. of es.next macro) Co-authored-by: Martin Negyokru negyokru@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
@@ -128,3 +128,47 @@ assert (r.multiline == false);
|
||||
|
||||
/* RegExp properties */
|
||||
assert (RegExp.length === 2);
|
||||
|
||||
var r = RegExp ("a","gim");
|
||||
var r2 = RegExp (r,"gim");
|
||||
var r3 = RegExp (r);
|
||||
|
||||
assert(r2.source === 'a');
|
||||
assert(r2.global === true);
|
||||
assert(r2.ignoreCase === true);
|
||||
assert(r2.multiline === true);
|
||||
|
||||
assert(r3.source === 'a');
|
||||
assert(r3.global === true);
|
||||
assert(r3.ignoreCase === true);
|
||||
assert(r3.multiline === true);
|
||||
|
||||
var obj = { get source() { throw 5 }, [Symbol.match] : true }
|
||||
|
||||
try {
|
||||
new RegExp (obj);
|
||||
assert(false)
|
||||
} catch (e) {
|
||||
assert(e === 5);
|
||||
}
|
||||
|
||||
r = new RegExp ("a","gimuy");
|
||||
assert (r.global === true);
|
||||
assert (r.ignoreCase === true);
|
||||
assert (r.multiline === true);
|
||||
assert (r.unicode === true);
|
||||
assert (r.sticky === true);
|
||||
|
||||
try {
|
||||
new RegExp ("a", "uu");
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof SyntaxError);
|
||||
}
|
||||
|
||||
try {
|
||||
new RegExp ("a", "yy");
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof SyntaxError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user