Skip to content

Commit

Permalink
Add tests for invalid surrogate pairs (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 authored Aug 2, 2024
1 parent 18a5245 commit b1fdeaf
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/name_selector.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@
"A"
]
},
{
"name": "double quotes, supplementary plane character",
"selector": "$[\"𝄞\"]",
"document": {
"𝄞": "A"
},
"result": [
"A"
]
},
{
"name": "double quotes, escaped double quote",
"selector": "$[\"\\\"\"]",
Expand Down Expand Up @@ -404,6 +414,31 @@
"selector": "$[\"\\u{10ffff}\"]",
"invalid_selector": true
},
{
"name": "double quotes, single high surrogate",
"selector": "$[\"\\uD800\"]",
"invalid_selector": true
},
{
"name": "double quotes, single low surrogate",
"selector": "$[\"\\uDC00\"]",
"invalid_selector": true
},
{
"name": "double quotes, high high surrogate",
"selector": "$[\"\\uD800\\uD800\"]",
"invalid_selector": true
},
{
"name": "double quotes, low low surrogate",
"selector": "$[\"\\uDC00\\uDC00\"]",
"invalid_selector": true
},
{
"name": "double quotes, surrogate non-surrogate",
"selector": "$[\"\\uD800\\u1234\"]",
"invalid_selector": true
},
{
"name": "single quotes",
"selector": "$['a']",
Expand Down

0 comments on commit b1fdeaf

Please sign in to comment.