~ubuntu-branches/ubuntu/trusty/wget/trusty-updates

« back to all changes in this revision

Viewing changes to src/test.c

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-12-12 08:15:59 UTC
  • mfrom: (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091212081559-mvccl4kzdqb138y3
Tags: 1.12-1.1ubuntu1
* Merge from debian testing, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
* Keep build dependencies in main:
  - debian/control: remove info2man build-dep
  - debian/patches/00list: disable wget-infopod_generated_manpage.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Unit testing.
2
 
   Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
2
   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
 
3
   Inc.
3
4
 
4
5
This file is part of GNU Wget.
5
6
 
38
39
const char *test_parse_content_disposition();
39
40
const char *test_subdir_p();
40
41
const char *test_dir_matches_p();
 
42
const char *test_commands_sorted();
41
43
const char *test_cmd_spec_restrict_file_names();
42
44
const char *test_path_simplify ();
43
45
const char *test_append_uri_pathel();
52
54
  mu_run_test (test_parse_content_disposition);
53
55
  mu_run_test (test_subdir_p);
54
56
  mu_run_test (test_dir_matches_p);
 
57
  mu_run_test (test_commands_sorted);
55
58
  mu_run_test (test_cmd_spec_restrict_file_names);
56
59
  mu_run_test (test_path_simplify);
57
60
  mu_run_test (test_append_uri_pathel);
58
61
  mu_run_test (test_are_urls_equal);
59
62
  mu_run_test (test_is_robots_txt_url);
60
 
  
 
63
 
61
64
  return NULL;
62
65
}
63
66
 
 
67
char *program_name; /* Needed by lib/error.c. */
64
68
 
65
69
int
66
 
main (void) 
 
70
main (int argc, char *argv[])
67
71
{
68
 
  const char *result = all_tests();
69
 
  
70
 
  if (result != NULL) 
 
72
  const char *result;
 
73
 
 
74
  program_name = argv[0];
 
75
 
 
76
  result = all_tests();
 
77
 
 
78
  if (result != NULL)
71
79
    {
72
80
      puts (result);
73
81
    }
74
 
  else 
 
82
  else
75
83
    {
76
84
      printf ("ALL TESTS PASSED\n");
77
85
    }
78
 
  
 
86
 
79
87
  printf ("Tests run: %d\n", tests_run);
80
 
 
 
88
 
81
89
  return result != 0;
82
90
}
83
91