test/harness/gc-test.c
author ali <ali@juiblex.co.uk>
Wed Jan 25 19:33:43 2012 +0000 (2012-01-25)
changeset 2 cbd63f7ba40f
permissions -rw-r--r--
Don't test that gutcheck ignores paragraphs with only short lines
     1 #include <stdlib.h>
     2 #include <stdio.h>
     3 #include <string.h>
     4 #include <gclib/gclib.h>
     5 #include "testcase.h"
     6 #include "testcaseio.h"
     7 
     8 /*
     9  * Returns FALSE if the test should be considered to have failed.
    10  * (returns TRUE on pass or expected-fail).
    11  */
    12 boolean run_test(const char *filename)
    13 {
    14     Testcase *testcase;
    15     boolean retval;
    16     testcase=testcase_parse_file(filename);
    17     if (!testcase)
    18 	return FALSE;
    19     retval=testcase_run(testcase);
    20     testcase_free(testcase);
    21     return retval;
    22 }
    23 
    24 int main(int argc,char **argv)
    25 {
    26     int i;
    27     boolean pass=TRUE;
    28     for(i=1;i<argc;i++)
    29 	pass&=run_test(argv[i]);
    30     return pass?0:1;
    31 }