Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Side by Side Diff: third_party/libxml/src/runtest.c

Issue 2792873002: Roll libxml to e905f08123e4a6e7731549e6f09dadff4cab65bd (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxml/src/libxml2.spec ('k') | third_party/libxml/src/testlimits.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * runtest.c: C program to run libxml2 regression tests without 2 * runtest.c: C program to run libxml2 regression tests without
3 * requiring make or Python, and reducing platform dependancies 3 * requiring make or Python, and reducing platform dependancies
4 * to a strict minimum. 4 * to a strict minimum.
5 * 5 *
6 * To compile on Unixes: 6 * To compile on Unixes:
7 * cc -o runtest `xml2-config --cflags` runtest.c `xml2-config --libs` -lpthread 7 * cc -o runtest `xml2-config --cflags` runtest.c `xml2-config --libs` -lpthread
8 * 8 *
9 * See Copyright for the status of this software. 9 * See Copyright for the status of this software.
10 * 10 *
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 close(fd); 681 close(fd);
682 return(res != size); 682 return(res != size);
683 } 683 }
684 684
685 if (stat(filename, &info) < 0) { 685 if (stat(filename, &info) < 0) {
686 fprintf(stderr, "failed to stat %s\n", filename); 686 fprintf(stderr, "failed to stat %s\n", filename);
687 return(-1); 687 return(-1);
688 } 688 }
689 if (info.st_size != size) { 689 if (info.st_size != size) {
690 fprintf(stderr, "file %s is %ld bytes, result is %d bytes\n", 690 fprintf(stderr, "file %s is %ld bytes, result is %d bytes\n",
691 » filename, info.st_size, size); 691 » filename, (long) info.st_size, size);
692 return(-1); 692 return(-1);
693 } 693 }
694 fd = open(filename, RD_FLAGS); 694 fd = open(filename, RD_FLAGS);
695 if (fd < 0) { 695 if (fd < 0) {
696 fprintf(stderr, "failed to open %s for reading", filename); 696 fprintf(stderr, "failed to open %s for reading", filename);
697 return(-1); 697 return(-1);
698 } 698 }
699 while (idx < size) { 699 while (idx < size) {
700 res = read(fd, bytes, 4096); 700 res = read(fd, bytes, 4096);
701 if (res <= 0) 701 if (res <= 0)
(...skipping 3829 matching lines...) Expand 10 before | Expand all | Expand 10 after
4531 return(ret); 4531 return(ret);
4532 } 4532 }
4533 4533
4534 #else /* ! LIBXML_OUTPUT_ENABLED */ 4534 #else /* ! LIBXML_OUTPUT_ENABLED */
4535 int 4535 int
4536 main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { 4536 main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
4537 fprintf(stderr, "runtest requires output to be enabled in libxml2\n"); 4537 fprintf(stderr, "runtest requires output to be enabled in libxml2\n");
4538 return(1); 4538 return(1);
4539 } 4539 }
4540 #endif 4540 #endif
OLDNEW
« no previous file with comments | « third_party/libxml/src/libxml2.spec ('k') | third_party/libxml/src/testlimits.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698