| 373 | | OSyncError *error = NULL; |
|---|
| 374 | | OSyncXMLFormat *xmlformat = osync_xmlformat_new("contact", &error); |
|---|
| 375 | | fail_unless(xmlformat != NULL, NULL); |
|---|
| 376 | | fail_unless(error == NULL, NULL); |
|---|
| 377 | | |
|---|
| 378 | | OSyncXMLFormatSchema *schema1 = osync_xmlformat_schema_get_instance(xmlformat, &error); |
|---|
| 379 | | OSyncXMLFormatSchema *schema2 = osync_xmlformat_schema_get_instance(xmlformat, &error); |
|---|
| 380 | | |
|---|
| | 373 | char *testbed = setup_testbed("xmlformats"); |
|---|
| | 374 | |
|---|
| | 375 | OSyncError *error = NULL; |
|---|
| | 376 | |
|---|
| | 377 | //TODO disable libxml2 output to stderr |
|---|
| | 378 | |
|---|
| | 379 | OSyncXMLFormat *xmlformat = osync_xmlformat_new("abc", &error); |
|---|
| | 380 | OSyncXMLFormatSchema *failschema = osync_xmlformat_schema_get_instance_with_path(xmlformat, testbed, &error); |
|---|
| | 381 | fail_unless(failschema == NULL); |
|---|
| | 382 | osync_xmlformat_unref(xmlformat); |
|---|
| | 383 | |
|---|
| | 384 | xmlformat = osync_xmlformat_new("contact", &error); |
|---|
| | 385 | fail_if(xmlformat == NULL, NULL); |
|---|
| | 386 | fail_if(error == NULL, NULL); |
|---|
| | 387 | |
|---|
| | 388 | OSyncXMLFormatSchema *schema1 = osync_xmlformat_schema_get_instance_with_path(xmlformat, testbed, &error); |
|---|
| | 389 | OSyncXMLFormatSchema *schema2 = osync_xmlformat_schema_get_instance_with_path(xmlformat, testbed, &error); |
|---|
| | 390 | fail_if(schema1 == NULL); |
|---|
| | 391 | fail_if(schema2 == NULL); |
|---|