parser clears lexer when done parsing
This commit is contained in:
parent
b10f9b9123
commit
58986021de
4 changed files with 34 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue