1use strict;
2use FEAR::API -base;
3
4use Test::More tests => 5;
5
6my @links = $_->url('http://google.com')->fetch()->links;
7
8$_->keep_links('news');
9
10ok($_->links);
11ok($_->links < @links);
12
13$_->wua->{links} = [ @links ];
14$_->keep_links(tag => qr'no_such_a_tag');
15ok(!$_->links);
16
17$_->wua->{links} = [ @links ];
18$_->keep_links(text => qr'english'i);
19is($_->links, 1);
20
21$_->wua->{links} = [ @links ];
22$_->remove_links('ncr');
23is($_->links, @links-1);
24
25__END__
26