#include <glib.h>
#include "test.h"
-#define do_bad_test(s) do { char *r = markup_test (s); if (r == NULL) return FAILED ("Failed on test " # s); else free (r); } while (0)
+#define do_bad_test(s) do { char *r = markup_test (s); if (r == NULL) return FAILED ("Failed on test " # s); else g_free (r); } while (0)
#define do_ok_test(s) do { char *r = markup_test (s); if (r != NULL) return FAILED ("Could not parse valid " # s); } while (0)
static char *
return NULL;
}
+RESULT
+mcs_config (void)
+{
+ return markup_test ("<configuration>\r\n <system.diagnostics>\r\n <trace autoflush=\"true\" indentsize=\"4\">\r\n <listeners>\r\n <add name=\"compilerLogListener\" type=\"System.Diagnostics.TextWriterTraceListener,System\"/> </listeners> </trace> </system.diagnostics> </configuration>");
+
+}
+
+RESULT
+xml_parse (void)
+{
+ return markup_test ("<?xml version=\"1.0\" encoding=\"utf-8\"?><a></a>");
+}
+
+RESULT
+machine_config (void)
+{
+ char *data;
+ gsize size;
+
+ if (g_file_get_contents ("../../data/net_1_1/machine.config", &data, &size, NULL)){
+ return markup_test (data);
+ }
+ printf ("Ignoring this test\n");
+ return NULL;
+}
+
static Test markup_tests [] = {
{"invalid_documents", invalid_documents},
{"good_documents", valid_documents},
{"mono_domain", mono_domain},
+ {"mcs_config", mcs_config},
+ {"xml_parse", xml_parse},
+ {"machine_config", machine_config},
{NULL, NULL}
};