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

« back to all changes in this revision

Viewing changes to tests/Test--spider-r--no-content-disposition-trivial.px

  • 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
 
#!/usr/bin/perl -w
 
1
#!/usr/bin/perl
2
2
 
3
3
use strict;
 
4
use warnings;
4
5
 
5
6
use HTTPTest;
6
7
 
14
15
</head>
15
16
<body>
16
17
  <p>
17
 
    Some text and a link to a <a href="http://localhost:8080/secondpage.html">second page</a>.
18
 
    Also, a <a href="http://localhost:8080/nonexistent">broken link</a>.
 
18
    Some text and a link to a <a href="http://localhost:{{port}}/secondpage.html">second page</a>.
 
19
    Also, a <a href="http://localhost:{{port}}/nonexistent">broken link</a>.
19
20
  </p>
20
21
</body>
21
22
</html>
28
29
</head>
29
30
<body>
30
31
  <p>
31
 
    Some text and a link to a <a href="http://localhost:8080/thirdpage.html">third page</a>.
32
 
    Also, a <a href="http://localhost:8080/nonexistent">broken link</a>.
 
32
    Some text and a link to a <a href="http://localhost:{{port}}/thirdpage.html">third page</a>.
 
33
    Also, a <a href="http://localhost:{{port}}/nonexistent">broken link</a>.
33
34
  </p>
34
35
</body>
35
36
</html>
42
43
</head>
43
44
<body>
44
45
  <p>
45
 
    Some text and a link to a <a href="http://localhost:8080/dummy.txt">text file</a>.
46
 
    Also, another <a href="http://localhost:8080/againnonexistent">broken link</a>.
 
46
    Some text and a link to a <a href="http://localhost:{{port}}/dummy.txt">text file</a>.
 
47
    Also, another <a href="http://localhost:{{port}}/againnonexistent">broken link</a>.
47
48
  </p>
48
49
</body>
49
50
</html>
89
90
    },
90
91
);
91
92
 
92
 
my $cmdline = $WgetTest::WGETPATH . " --spider -r --no-content-disposition http://localhost:8080/";
 
93
my $cmdline = $WgetTest::WGETPATH . " --spider -r --no-content-disposition http://localhost:{{port}}/";
93
94
 
94
 
my $expected_error_code = 0;
 
95
my $expected_error_code = 8;
95
96
 
96
97
my %expected_downloaded_files = (
97
98
);
99
100
###############################################################################
100
101
 
101
102
my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition-trivial",
102
 
                              input => \%urls, 
103
 
                              cmdline => $cmdline, 
104
 
                              errcode => $expected_error_code, 
 
103
                              input => \%urls,
 
104
                              cmdline => $cmdline,
 
105
                              errcode => $expected_error_code,
105
106
                              output => \%expected_downloaded_files);
106
107
exit $the_test->run();
107
108