| 290 | } |
| 291 | |
| 292 | static int |
| 293 | xmlconfTestItem(xmlDocPtr doc, xmlNodePtr cur) { |
| 294 | int ret = -1; |
| 295 | xmlChar *type = NULL; |
| 296 | xmlChar *filename = NULL; |
| 297 | xmlChar *uri = NULL; |
| 298 | xmlChar *base = NULL; |
| 299 | xmlChar *id = NULL; |
| 300 | xmlChar *rec = NULL; |
| 301 | xmlChar *version = NULL; |
| 302 | xmlChar *entities = NULL; |
| 303 | xmlChar *edition = NULL; |
| 304 | int options = 0; |
| 305 | int nstest = 0; |
| 306 | int mem, final; |
| 307 | int i; |
| 308 | |
| 309 | testErrorsSize = 0; testErrors[0] = 0; |
| 310 | nbError = 0; |
| 311 | nbFatal = 0; |
| 312 | id = xmlGetProp(cur, BAD_CAST "ID"); |
| 313 | if (id == NULL) { |
| 314 | test_log("test missing ID, line %ld\n", xmlGetLineNo(cur)); |
| 315 | goto error; |
| 316 | } |
| 317 | for (i = 0;skipped_tests[i] != NULL;i++) { |
| 318 | if (!strcmp(skipped_tests[i], (char *) id)) { |
| 319 | test_log("Skipping test %s from skipped list\n", (char *) id); |
| 320 | ret = 0; |
| 321 | nb_skipped++; |
| 322 | goto error; |
| 323 | } |
| 324 | } |
| 325 | type = xmlGetProp(cur, BAD_CAST "TYPE"); |
| 326 | if (type == NULL) { |
| 327 | test_log("test %s missing TYPE\n", (char *) id); |
| 328 | goto error; |
| 329 | } |
| 330 | uri = xmlGetProp(cur, BAD_CAST "URI"); |
| 331 | if (uri == NULL) { |
| 332 | test_log("test %s missing URI\n", (char *) id); |
| 333 | goto error; |
| 334 | } |
| 335 | base = xmlNodeGetBase(doc, cur); |
| 336 | filename = composeDir(base, uri); |
| 337 | if (!checkTestFile((char *) filename)) { |
| 338 | test_log("test %s missing file %s \n", id, |
| 339 | (filename ? (char *)filename : "NULL")); |
| 340 | goto error; |
| 341 | } |
| 342 | |
| 343 | version = xmlGetProp(cur, BAD_CAST "VERSION"); |
| 344 | |
| 345 | entities = xmlGetProp(cur, BAD_CAST "ENTITIES"); |
| 346 | if (!xmlStrEqual(entities, BAD_CAST "none")) { |
| 347 | options |= XML_PARSE_DTDLOAD; |
| 348 | options |= XML_PARSE_NOENT; |
| 349 | } |
no test coverage detected