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