1 use Test::More tests => 3;
14 <Table><tr><td>1<td>2<td>3
25 my $tmpfile = "test-$$.htm";
26 die "$tmpfile already exists" if -e $tmpfile;
28 open(HTML, ">$tmpfile") or die "$!";
31 my $save = new SelectSaver(HTML);
32 HTML::Filter->new->parse($HTML)->eof;
36 open(HTML, $tmpfile) or die "$!";
38 my $FILTERED = <HTML>;
46 @ISA=qw(HTML::Filter);
48 sub output { push(@{$_[0]->{fhtml}}, $_[1]) }
49 sub filtered_html { join("", @{$_[0]->{fhtml}}) }
52 my $f2 = MyFilter->new->parse_file($tmpfile)->filtered_html;
53 unlink($tmpfile) or warn "Can't unlink $tmpfile: $!";