
use Test;
BEGIN { plan tests => 4 };
#
# Test 1: load it
#
use HTTP::GetImages;
ok(1);

#
# Test 2: Duncan McGreggor's Google problem
#

$_ = new HTTP::GetImages (
	dir		=> '.',
	todo	=> ['http://www.google.com/',],
	dont	=> ['http://www.somewhere/ignorethis.html','http://and.this.html'],
);

=head1 Use later

print "Print images:\n";
$_->print_imgs;
print "\nPrint done:\n";
$_->print_done;
print "\nprint failed:\n";
$_->print_failed;
print "\nprint ignored\n";
$_->print_ignored;
print "\nImages as hash\n";
my $hash = $_->imgs_as_hash;
foreach (keys %{$hash}){
	warn "$_ = ",$hash->{$_},"\n";
}
die;

=cut

#
# Test 3,4: Duncan Lamb's match_url
#

new HTTP::GetImages (
	dir		=> '.',
	todo	=> 'http://www.google.com/',
	dont	=> ['http://www.somewhere/ignorethis.html','http://and.this.html'],
	match_url	=> 'http://www.google',
);

new HTTP::GetImages (
	dir		=> '.',
	todo	=> 'http://www.google.com/',
	dont	=> ['http://www.somewhere/ignorethis.html','http://and.this.html'],
	match_url	=> ['foo','bar',],
);


exit;
