5 #include "mock_prefs_common_get_use_shred.h"
6 #include "mock_prefs_common_get_flush_metadata.h"
8 #define DATADIR "data/"
11 test_xml_open_file_missing(void)
13 XMLFile *xf = xml_open_file(DATADIR "missing.xml");
18 test_xml_open_file_empty(void)
20 XMLFile *xf = xml_open_file(DATADIR "empty.xml");
22 g_assert_nonnull(xf->buf);
23 g_assert_nonnull(xf->bufp);
24 g_assert_null(xf->dtd);
25 g_assert_null(xf->encoding);
26 g_assert_null(xf->tag_stack);
27 g_assert_cmpint(xf->level, ==, 0);
28 g_assert_false(xf->is_empty_element);
32 main(int argc, char *argv[])
34 g_test_init(&argc, &argv, NULL);
36 g_test_add_func("/common/xml_open_file_missing", test_xml_open_file_missing);
37 g_test_add_func("/common/xml_open_file_empty", test_xml_open_file_empty);