X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=eglib%2Ftest%2Fmarkup.c;h=cf8d3f2d5793b1bea52118ff30310ca532f66b27;hb=1db2001526e816a5ca41f1247635cfcb5fca020d;hp=2cd72d158e6538c2145cb3e87b0015944c722f91;hpb=9869ae24b88761ab261c4311e24f7383b4af3f02;p=mono.git diff --git a/eglib/test/markup.c b/eglib/test/markup.c index 2cd72d158e6..cf8d3f2d579 100644 --- a/eglib/test/markup.c +++ b/eglib/test/markup.c @@ -3,7 +3,7 @@ #include #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 * @@ -194,10 +194,39 @@ mono_domain (void) return NULL; } +RESULT +mcs_config (void) +{ + return markup_test ("\r\n \r\n \r\n \r\n "); + +} + +RESULT +xml_parse (void) +{ + return markup_test (""); +} + +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} };