Fix string position calculation in @@replace (#3831)
Fixes #3817. JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
@@ -621,6 +621,10 @@ try {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
assert(replace.call({ exec : ( ) => { return { } } }, 'һ', "a") === "a");
|
||||
assert(replace.call({ exec : ( ) => { return { } } }, 'һһһһһһһһһ', "a") === "a");
|
||||
assert(replace.call({ exec : ( ) => { return { } } }, 'һһһһһһһһһһ', "a") === "aһ");
|
||||
|
||||
/* Object with custom @@replace method */
|
||||
var o = {}
|
||||
o[Symbol.replace] = function () {
|
||||
|
||||
Reference in New Issue
Block a user