mirror of
https://github.com/zoriya/xmlParser.git
synced 2026-05-27 16:11:44 +00:00
Parse works with next nodes
This commit is contained in:
@@ -31,4 +31,20 @@ Test(xml, withparam)
|
||||
cr_assert_str_eq(n->properties->key, "params");
|
||||
cr_assert_str_eq(n->properties->value, "Test");
|
||||
cr_assert_eq(n->properties->next, NULL);
|
||||
}
|
||||
|
||||
Test(xml, withnext)
|
||||
{
|
||||
char *xml = strdup("<yes params=\"Test\"/><nop/>");
|
||||
node *n = xml_parsenode(&xml);
|
||||
|
||||
cr_assert_str_eq(n->name, "yes");
|
||||
cr_assert_eq(n->child, NULL);
|
||||
cr_assert_str_eq(n->properties->key, "params");
|
||||
cr_assert_str_eq(n->properties->value, "Test");
|
||||
cr_assert_eq(n->properties->next, NULL);
|
||||
cr_assert_str_eq(n->next->name, "nop");
|
||||
cr_assert_eq(n->next->child, NULL);
|
||||
cr_assert_eq(n->next->properties, NULL);
|
||||
cr_assert_eq(n->next->next, NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user