mirror of
https://github.com/zoriya/xmlParser.git
synced 2026-05-22 14:32:18 +00:00
Testing the parser with params
This commit is contained in:
@@ -18,4 +18,17 @@ Test(xml, simple)
|
||||
cr_assert_eq(n->child, NULL);
|
||||
cr_assert_eq(n->next, NULL);
|
||||
cr_assert_eq(n->properties, NULL);
|
||||
}
|
||||
|
||||
Test(xml, withparam)
|
||||
{
|
||||
char *xml = strdup("<yes params=\"Test\"/>");
|
||||
node *n = xml_parsenode(&xml);
|
||||
|
||||
cr_assert_str_eq(n->name, "yes");
|
||||
cr_assert_eq(n->child, NULL);
|
||||
cr_assert_eq(n->next, NULL);
|
||||
cr_assert_str_eq(n->properties->key, "params");
|
||||
cr_assert_str_eq(n->properties->value, "Test");
|
||||
cr_assert_eq(n->properties->next, NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user