parser clears lexer when done parsing

This commit is contained in:
herbglitch 2024-10-30 18:41:01 -06:00
parent b10f9b9123
commit 58986021de
4 changed files with 34 additions and 1 deletions

View file

@ -128,4 +128,22 @@ ARC_TEST(Parser_Basic_ParseError){
ARC_Parser_Parse(parser, &tempString);
ARC_CHECK(arc_errno == ARC_ERRNO_DATA);
//check again with moved character
arc_errno = 0;
ARC_String_CreateWithStrlen(&tempString, "my!Var1");
//this destroys string, so no need for cleanup
ARC_Parser_Parse(parser, &tempString);
ARC_CHECK(arc_errno == ARC_ERRNO_DATA);
//check again with moved character
arc_errno = 0;
ARC_String_CreateWithStrlen(&tempString, "myVar1!");
//this destroys string, so no need for cleanup
ARC_Parser_Parse(parser, &tempString);
ARC_CHECK(arc_errno == ARC_ERRNO_DATA);
}