Change raw string length calculation method (#3772)
New method uses length of source to calculate raw string length. Also bug with template literal was fixed. Template object should have indexed properties enumerable. JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
@@ -126,3 +126,14 @@ assert (String.raw`Hi\n${2+3}!` === "Hi\\n5!");
|
||||
var localNew = new getStr();
|
||||
assert(chainedCall === getStr() && chainedCall === localNew);
|
||||
})();
|
||||
|
||||
var templateObject;
|
||||
|
||||
(function(p) {
|
||||
templateObject = p;
|
||||
})`str`;
|
||||
|
||||
var desc = Object.getOwnPropertyDescriptor(templateObject, '0');
|
||||
assert(desc.writable === false);
|
||||
assert(desc.enumerable === true);
|
||||
assert(desc.configurable === false);
|
||||
|
||||
Reference in New Issue
Block a user