Skip to content

Commit

Permalink
Merge pull request #86 from Marcono1234/invalid-escape-sequences
Browse files Browse the repository at this point in the history
Add more tests for invalid escape sequences
  • Loading branch information
gregsdennis authored Aug 1, 2024
2 parents 87f9420 + a84d8e4 commit 651dcb8
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions tests/name_selector.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,76 @@
"selector": "$[\"\\\"]",
"invalid_selector": true
},
{
"name": "double quotes, escape at end of line",
"selector": "$[\"\\\n\"]",
"invalid_selector": true
},
{
"name": "double quotes, question mark escape",
"selector": "$[\"\\?\"]",
"invalid_selector": true
},
{
"name": "double quotes, bell escape",
"selector": "$[\"\\a\"]",
"invalid_selector": true
},
{
"name": "double quotes, vertical tab escape",
"selector": "$[\"\\v\"]",
"invalid_selector": true
},
{
"name": "double quotes, 0 escape",
"selector": "$[\"\\0\"]",
"invalid_selector": true
},
{
"name": "double quotes, x escape",
"selector": "$[\"\\x12\"]",
"invalid_selector": true
},
{
"name": "double quotes, n escape",
"selector": "$[\"\\N{LATIN CAPITAL LETTER A}\"]",
"invalid_selector": true
},
{
"name": "double quotes, unicode escape no hex",
"selector": "$[\"\\u\"]",
"invalid_selector": true
},
{
"name": "double quotes, unicode escape too few hex",
"selector": "$[\"\\u123\"]",
"invalid_selector": true
},
{
"name": "double quotes, unicode escape upper u",
"selector": "$[\"\\U1234\"]",
"invalid_selector": true
},
{
"name": "double quotes, unicode escape upper u long",
"selector": "$[\"\\U0010FFFF\"]",
"invalid_selector": true
},
{
"name": "double quotes, unicode escape plus",
"selector": "$[\"\\u+1234\"]",
"invalid_selector": true
},
{
"name": "double quotes, unicode escape brackets",
"selector": "$[\"\\u{1234}\"]",
"invalid_selector": true
},
{
"name": "double quotes, unicode escape brackets long",
"selector": "$[\"\\u{10ffff}\"]",
"invalid_selector": true
},
{
"name": "single quotes",
"selector": "$['a']",
Expand Down

0 comments on commit 651dcb8

Please sign in to comment.