mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:03:36 +03:00
Convert (most of) the test data files into genuine XML. A handful still
are not, due mainly to the lack of support for XML character entities (e.g. & => & ). This will make it easier to validate test files using tools like xmllint, as well as edit and view them using XML tools.
This commit is contained in:
parent
9ab7cda010
commit
33bea767eb
329 changed files with 801 additions and 106 deletions
|
|
@ -120,6 +120,7 @@ const char *spitout(FILE *stream,
|
|||
|
||||
enum {
|
||||
STATE_OUTSIDE,
|
||||
STATE_OUTER,
|
||||
STATE_INMAIN,
|
||||
STATE_INSUB,
|
||||
STATE_ILLEGAL
|
||||
|
|
@ -173,6 +174,10 @@ const char *spitout(FILE *stream,
|
|||
cmain[0]=0; /* no main anymore */
|
||||
display=0;
|
||||
}
|
||||
else if(state == STATE_OUTER) {
|
||||
/* this is the end of the outermost file section */
|
||||
state--;
|
||||
}
|
||||
}
|
||||
else if(!display) {
|
||||
/* this is the beginning of a section */
|
||||
|
|
@ -182,6 +187,10 @@ const char *spitout(FILE *stream,
|
|||
*end = 0;
|
||||
switch(state) {
|
||||
case STATE_OUTSIDE:
|
||||
/* Ignore the outermost <testcase> element */
|
||||
state = STATE_OUTER;
|
||||
break;
|
||||
case STATE_OUTER:
|
||||
strcpy(cmain, ptr);
|
||||
state = STATE_INMAIN;
|
||||
break;
|
||||
|
|
@ -214,6 +223,10 @@ const char *spitout(FILE *stream,
|
|||
show(("* (%d bytes) %s\n", stringlen, buffer));
|
||||
display = 1; /* start displaying */
|
||||
}
|
||||
else if ((*cmain == '!') || (*csub == '!')) {
|
||||
/* This is just a comment, not a new section */
|
||||
state--;
|
||||
}
|
||||
else {
|
||||
show(("%d (%s/%s): %s\n", state, cmain, csub, buffer));
|
||||
display = 0; /* no display */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue