mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-22 04:27:25 +03:00
[lexer] add fail tests for bidi overrides
This commit is contained in:
parent
4fa12a0b33
commit
3227930df9
@ -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."
|
||||
|
@ -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."
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370043]: Unicode bidi override code point encountered."
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370043]: Unicode bidi override code point encountered."
|
@ -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 | ^^^^"
|
||||
|
@ -56,3 +56,4 @@ expectation: Fail
|
||||
'\u{bbbbb}\u{aaaa}'
|
||||
|
||||
'😭😂😘'
|
||||
''
|
||||
|
@ -27,4 +27,6 @@ expectation: Fail
|
||||
|
||||
"\"
|
||||
|
||||
"⭇😍;
|
||||
"⭇😍;
|
||||
|
||||
"2066:"
|
||||
|
10
tests/parser/program/bidi_comment.leo
Normal file
10
tests/parser/program/bidi_comment.leo
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
// 202E<-here
|
||||
let x = 1u8;
|
||||
}
|
||||
$
|
9
tests/parser/program/bidi_comment_2
Normal file
9
tests/parser/program/bidi_comment_2
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
/* next line starts with 2069
|
||||
*/
|
||||
}
|
@ -3,6 +3,8 @@ namespace: ParseStatement
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
console.error(""); // bidi override
|
||||
|
||||
console.log(1);
|
||||
|
||||
console.test();
|
||||
console.test();
|
||||
|
Loading…
Reference in New Issue
Block a user