Fix RegExp character class compilation on unicode ranges.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
@@ -111,3 +111,21 @@ catch (e)
|
||||
{
|
||||
assert (e instanceof SyntaxError);
|
||||
}
|
||||
|
||||
r = new RegExp ("^[\\u0061-\\u007a]+$").exec("abcdefghjklmnopqrstuvwxyz");
|
||||
assert (r == "abcdefghjklmnopqrstuvwxyz");
|
||||
|
||||
r = new RegExp ("^[\\u0061-\\u007a]+").exec("abcdefghjklmnopqrstuvwxyz");
|
||||
assert (r == "abcdefghjklmnopqrstuvwxyz");
|
||||
|
||||
r = new RegExp ("[\\u0061-\\u007a]+$").exec("abcdefghjklmnopqrstuvwxyz");
|
||||
assert (r == "abcdefghjklmnopqrstuvwxyz");
|
||||
|
||||
r = new RegExp ("^[\\x61-\\x7a]+$").exec("abcdefghjklmnopqrstuvwxyz");
|
||||
assert (r == "abcdefghjklmnopqrstuvwxyz");
|
||||
|
||||
r = new RegExp ("^[\\x61-\\x7a]+").exec("abcdefghjklmnopqrstuvwxyz");
|
||||
assert (r == "abcdefghjklmnopqrstuvwxyz");
|
||||
|
||||
r = new RegExp ("[\\x61-\\x7a]+$").exec("abcdefghjklmnopqrstuvwxyz");
|
||||
assert (r == "abcdefghjklmnopqrstuvwxyz");
|
||||
|
||||
Reference in New Issue
Block a user