-#!/usr/bin/perl -w
+#!/usr/bin/env perl
use strict;
+use warnings;
+use WgetFeature qw(iri);
use HTTPTest;
# cf. http://en.wikipedia.org/wiki/Latin1
'/p2_%C3%A9%C3%A9n.html' => { # UTF-8 encoded
code => "200",
msg => "Ok",
- headers => {
- "Content-type" => "text/html; charset=ISO-8859-1",
+ request_headers => {
+ "Referer" => qr|http://localhost:[0-9]+/p1_fran%E7ais.html|,
},
- content => $pageeen,
- },
- '/p2_%E9%E9n.html' => {
- code => "200",
- msg => "Ok",
headers => {
"Content-type" => "text/html; charset=ISO-8859-1",
},
'/p4_m%C3%A9%C3%A9r.html' => {
code => "200",
msg => "Ok",
+ request_headers => {
+ "Referer" => qr|http://localhost:[0-9]+/p2_%C3%A9%C3%A9n.html|,
+ },
headers => {
"Content-type" => "text/plain; charset=UTF-8",
},
###############################################################################
my $the_test = HTTPTest->new (name => "Test-iri",
- input => \%urls,
- cmdline => $cmdline,
- errcode => $expected_error_code,
+ input => \%urls,
+ cmdline => $cmdline,
+ errcode => $expected_error_code,
output => \%expected_downloaded_files);
exit $the_test->run();