X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Ftest.c;h=2d7e41f8149cc33281760efcdf2fdf72ab5dc8ac;hb=4a08094db88011153adadbf995103770b20d2a31;hp=3187900db44c5da3c3f01746dcf69adb012b4434;hpb=d5e283b1a75c5f8249300b465b4e7b55130bec49;p=wget diff --git a/src/test.c b/src/test.c index 3187900d..2d7e41f8 100644 --- a/src/test.c +++ b/src/test.c @@ -1,5 +1,6 @@ /* Unit testing. - Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, + Inc. This file is part of GNU Wget. @@ -59,27 +60,32 @@ all_tests() mu_run_test (test_append_uri_pathel); mu_run_test (test_are_urls_equal); mu_run_test (test_is_robots_txt_url); - + return NULL; } +char *program_name; /* Needed by lib/error.c. */ int -main (void) +main (int argc, char *argv[]) { - const char *result = all_tests(); - - if (result != NULL) + const char *result; + + program_name = argv[0]; + + result = all_tests(); + + if (result != NULL) { puts (result); } - else + else { printf ("ALL TESTS PASSED\n"); } - + printf ("Tests run: %d\n", tests_run); - + return result != 0; }