test262 icon indicating copy to clipboard operation
test262 copied to clipboard

Test missing for \u{10000} ... \u{10FFFF} in Template Literals

Open p-bakker opened this issue 3 years ago • 2 comments

Code implementing Bullet 3 - 5 of https://tc39.es/ecma262/#sec-utf16encodecodepoint isn't hit when when a \u{...} unicode escape sequence in the range of 0x10000 through 0x10FFFF is used in a Template Literal

None of the existing tests for (Tagged) Template Literals include a Template Literal with a unicode escape sequence in that range

p-bakker avatar May 29 '21 11:05 p-bakker

Test could be something like

(function(str) {return str[0]})`\u{1F680}` === '🚀'

Happy to create a PR, just not sure exactly where to put this test, in a new file or in one of the existing files in /language/expressions/template-literal

p-bakker avatar May 31 '21 07:05 p-bakker

Wow, Rhino! Thanks for going the extra mile and letting us know about the missing coverage. If you have the bandwidth, it would be great to get your contribution. If not, I'll gladly write a patch based on your report.

test/language/expressions/template-literal/tv-utf16-escape-sequence.js seems like a logical place for the assertion. I'd also support placing it in a dedicated file--you can only fail a test once, after all.

jugglinmike avatar Jun 03 '21 16:06 jugglinmike