Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b053714

Browse files
eemelimacchiati
andauthored
Add tests for extended name character range (#1020)
* Add tests for extended name character range * glyph -> code point * Add emoji above U+FFFF Co-authored-by: Mark Davis <[email protected]> --------- Co-authored-by: Mark Davis <[email protected]>
1 parent 914e0da commit b053714

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

test/tests/syntax-errors.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@
193193
{ "src": "{^.}" },
194194
{ "src": "{^ .}" },
195195
{ "src": "{&}" },
196+
{ "src": "{\ud800}" },
197+
{ "src": "{\ufdd0}" },
198+
{ "src": "{\ufffe}" },
196199
{ "src": "{!.\\{}" },
197200
{ "src": "{!. \\{}" },
198201
{ "src": "{!|a|}" },

test/tests/syntax.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,36 @@
490490
"src": "{0E-1}",
491491
"exp": "0E-1"
492492
},
493+
{
494+
"description": "- as unquoted-literal",
495+
"src": "{-}",
496+
"exp": "-"
497+
},
498+
{
499+
"description": ". as unquoted-literal",
500+
"src": "{·}",
501+
"exp": "·"
502+
},
503+
{
504+
"description": "emoji as unquoted-literal",
505+
"src": "{🥔}",
506+
"exp": "🥔"
507+
},
508+
{
509+
"description": "emoji above U+FFFF as unquoted-literal, ",
510+
"src": "{🀄️}",
511+
"exp": "🀄️"
512+
},
513+
{
514+
"description": "multi-code-point emoji as unquoted-literal",
515+
"src": "{🏳️‍🌈}",
516+
"exp": "🏳️‍🌈"
517+
},
518+
{
519+
"description": "various characters as unquoted-literal",
520+
"src": "{\u00a1\u061d\u1681\u200b\u2010\u2030\u2060\u206a\u3001\ue000\ufdf0}",
521+
"exp": "\u00a1\u061d\u1681\u200b\u2010\u2030\u2060\u206a\u3001\ue000\ufdf0"
522+
},
493523
{
494524
"src": "hello { world\t\n}",
495525
"exp": "hello world"

0 commit comments

Comments
 (0)