mirror of
https://github.com/zoriya/xmlParser.git
synced 2025-12-19 00:55:11 +00:00
The xml parse works for <yes/>. Adding tests
This commit is contained in:
21
tests/test_basics.c
Normal file
21
tests/test_basics.c
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
** EPITECH PROJECT, 2019
|
||||
** xmlparser
|
||||
** File description:
|
||||
** test_basics
|
||||
*/
|
||||
|
||||
#include "xml.h"
|
||||
#include <criterion/criterion.h>
|
||||
#include <string.h>
|
||||
|
||||
Test(xml, simple)
|
||||
{
|
||||
char *xml = strdup("<yes/>");
|
||||
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_eq(n->properties, NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user