Skip to content

Commit

Permalink
Add more surrogate pair tests (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 authored Aug 3, 2024
1 parent c2b4aea commit 905cc5d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tests/name_selector.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,26 @@
"A"
]
},
{
"name": "double quotes, before high surrogates",
"selector": "$[\"\\uD7FF\\uD7FF\"]",
"document": {
"\uD7FF\uD7FF": "A"
},
"result": [
"A"
]
},
{
"name": "double quotes, after low surrogates",
"selector": "$[\"\\uE000\\uE000\"]",
"document": {
"\uE000\uE000": "A"
},
"result": [
"A"
]
},
{
"name": "double quotes, invalid escaped single quote",
"selector": "$[\"\\'\"]",
Expand Down Expand Up @@ -449,6 +469,26 @@
"selector": "$[\"\\uD800\\u1234\"]",
"invalid_selector": true
},
{
"name": "double quotes, non-surrogate surrogate",
"selector": "$[\"\\u1234\\uDC00\"]",
"invalid_selector": true
},
{
"name": "double quotes, surrogate supplementary",
"selector": "$[\"\\uD800𝄞\"]",
"invalid_selector": true
},
{
"name": "double quotes, supplementary surrogate",
"selector": "$[\"𝄞\\uDC00\"]",
"invalid_selector": true
},
{
"name": "double quotes, surrogate incomplete low",
"selector": "$[\"\\uD800\\uDC0\"]",
"invalid_selector": true
},
{
"name": "single quotes",
"selector": "$['a']",
Expand Down

0 comments on commit 905cc5d

Please sign in to comment.