5 #include "sixtp-dom-parsers.h"
6 #include "sixtp-dom-generators.h"
10 #include "test-stuff.h"
12 #include "test-file-stuff.h"
14 #define GNC_V2_STRING "gnc-v2"
15 const gchar *gnc_v2_xml_version_string = GNC_V2_STRING;
21 "Something with a & in it",
22 "Ugly(*!&@#$NTHOEAUTF\"ntaheu09.h,. \n\t",
28 test_string_converters(
void)
37 test_node = text_to_dom_tree(
"test-string", mark);
39 backout = dom_tree_to_text(test_node);
42 g_strcmp0(backout, mark) == 0,
43 "string converting", __FILE__, __LINE__,
"with string %s", mark);
48 test_bad_string (
void)
50 gchar *badstr =
"foo\abar";
51 gchar *sanitized =
"foo?bar";
53 xmlNodePtr test_node = text_to_dom_tree (
"test-string", badstr);
55 backout = dom_tree_to_text (test_node);
56 do_test_args (g_strcmp0 (backout, sanitized) == 0,
57 "string sanitizing", __FILE__, __LINE__,
58 "with string %s", badstr);
62 main(
int argc,
char **argv)
66 test_string_converters();
All type declarations for the whole Gnucash engine.