[lexer] add fail tests for bidi overrides

This commit is contained in:
Eric McCarthy 2022-04-19 13:16:09 -07:00
parent 4fa12a0b33
commit 3227930df9
10 changed files with 39 additions and 2 deletions

View File

@ -48,3 +48,4 @@ outputs:
- "Error [EPAR0370033]: The escaped unicode char `1234567890` is not within valid length of [1, 6]."
- "Error [EPAR0370026]: Expected a closed char but found `򻮻`."
- "Error [EPAR0370026]: Expected a closed char but found `😭`."
- "Error [EPAR0370043]: Unicode bidi override code point encountered."

View File

@ -15,3 +15,4 @@ outputs:
- "Error [EPAR0370032]: There was no closing `}` after a escaped unicode `af🦀\"`."
- "Error [EPAR0370025]: Expected a closed string but found `\"`."
- "Error [EPAR0370025]: Expected a closed string but found `⭇😍;`."
- "Error [EPAR0370043]: Unicode bidi override code point encountered."

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370043]: Unicode bidi override code point encountered."

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370043]: Unicode bidi override code point encountered."

View File

@ -2,5 +2,6 @@
namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370043]: Unicode bidi override code point encountered."
- "Error [EPAR0370009]: unexpected string: expected 'formatted string', got '1'\n --> test:1:13\n |\n 1 | console.log(1);\n | ^"
- "Error [EPAR0370007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'test'\n --> test:1:9\n |\n 1 | console.test();\n | ^^^^"

View File

@ -56,3 +56,4 @@ expectation: Fail
'\u{bbbbb}\u{aaaa}'
'😭😂😘'
''

View File

@ -27,4 +27,6 @@ expectation: Fail
"\"
"⭇😍;
"⭇😍;
"2066:"

View File

@ -0,0 +1,10 @@
/*
namespace: Parse
expectation: Fail
*/
function main() {
// 202E<-here
let x = 1u8;
}
$

View File

@ -0,0 +1,9 @@
/*
namespace: Parse
expectation: Fail
*/
function main() {
/* next line starts with 2069
*/
}

View File

@ -3,6 +3,8 @@ namespace: ParseStatement
expectation: Fail
*/
console.error(""); // bidi override
console.log(1);
console.test();
console.test();