7 #include "testcaseio.h"
9 static gboolean show_output;
11 static GOptionEntry options[]={
12 { "show-output", 'o', 0, G_OPTION_ARG_NONE, &show_output,
13 "Show bookloupe output", NULL },
18 * Returns FALSE if the test should be considered to have failed.
19 * (returns TRUE on pass or expected-fail).
21 gboolean run_test(const char *filename)
25 testcase=testcase_parse_file(filename);
29 retval=testcase_show_output(testcase);
31 retval=testcase_run(testcase);
32 testcase_free(testcase);
36 int main(int argc,char **argv)
41 GOptionContext *context;
42 context=g_option_context_new("file - run a bookloupe testcase");
43 g_option_context_add_main_entries(context,options,NULL);
44 if (!g_option_context_parse(context,&argc,&argv,&err))
46 g_printerr("loupe-test: %s\n",err->message);
47 g_printerr("Use \"%s --help\" for help\n",argv[0]);
50 bl_set_print_handlers();
52 pass&=run_test(argv[i]);