Add template literal tests for supplementary-plane unicode escape sequences - #5105
Open
hexbinoct wants to merge 1 commit into
Open
Add template literal tests for supplementary-plane unicode escape sequences#5105hexbinoct wants to merge 1 commit into
hexbinoct wants to merge 1 commit into
Conversation
Contributor
|
Thanks! Totally separate from a code review, I don't know the answer to the copyright name question. |
Member
|
My understanding is that the copyright notice isn't actually the thing that creates the copyright; it's mainly to track provenance as things get copied to new places, and to ensure you get credit. So your username should be OK if that's what you'd prefer. We already have some tests with just usernames. Incidentally US law explicitly allows using "a generally known alternative designation of the owner" in a copyright notice, though I don't know about other countries. |
Author
|
Thanks both, I will leave the copyright line as hexbinoct, and the prop-desc.js precedent is a useful one to have on record. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3001.
Template literals had no coverage for
\u{}escapes above U+FFFF, so the surrogate pair branch of UTF16EncodeCodePoint (steps 3 to 5) was never exercised. The only astral escapes in these tests today are the invalid seven-digit\u{10FFFFF}cases.The new file checks the cooked and raw values of tagged templates for U+10000 (the first code point that needs a surrogate pair), U+10437 (the character the spec itself uses as its UTF-16 example), U+10FFFF (the largest code point), and a leading-zeros form, plus the untagged path and concatenation with adjacent template characters. Expected values are written as explicit
\uD800\uDC00style pairs so they do not depend on the construct under test.Following jugglinmike's suggestion in the issue, the assertions live in a dedicated file next to
tv-utf16-escape-sequence.js. Thanks to p-bakker for reporting the gap from their work on Rhino.The copyright line says hexbinoct. Happy to swap in the legal name from the CLA if that is preferred.