Test lexing empty null string returns EOF

This commit is contained in:
josh committed 2021-07-06 12:06:07 -04:00
1 parent 3158e51059
commit c0c3353fd7
1 file changed
+3
+3
View File
@@ -60,4 +60,7 @@ unittest
assert(lexer.lex_token() == LT(1, 4, 1, Testparser.TOKEN_PLUS));
assert(lexer.lex_token() == LT(1, 6, 3, Testparser.TOKEN_INT));
assert(lexer.lex_token() == LT(1, 9, 0, Testparser.TOKEN_EOF));
lexer = new Testparser.Lexer(null, 0u);
assert(lexer.lex_token() == LT(0, 0, 0, Testparser.TOKEN_EOF));
}