3
use Test::More tests => 7;
7
use HTML::StripScripts;
8
my $f = HTML::StripScripts->new;
10
mytest( '', '<!--filtered--></i>', 'reject null' );
11
mytest( '</>', '<!--filtered--></i>', 'reject empty' );
12
mytest( '</->', '<!--filtered--></i>', 'reject malformed' );
13
mytest( '</foo>','<!--filtered--></i>', 'reject unknown' );
14
mytest( '</b>', '<!--filtered--></i>', 'reject misplaced' );
15
mytest( '</i>', '</i>', 'accept valid' );
16
mytest( '</I>', '</i>', 'accept uppercase' );
19
my ($in, $out, $name) = @_;
21
$f->input_start_document;
22
$f->input_start('<i>');
23
$f->input_text('foo');
25
$f->input_end_document;
26
is( $f->filtered_document, "<i>foo$out", "input_end $name" );