# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test; BEGIN { plan tests => 77 }; use HTML::Scrubber; ok(1); # If we made it this far, we're ok. # test 1 ######################### # Insert your test code below, the Test module is use()ed here so read # its man page ( perldoc Test ) for help writing this test script. my $html = q[
bold < underlined LINK ]; my $scrubber = HTML::Scrubber->new(); ok( $scrubber ); # test 2 ok( ! $scrubber->default() ); # test 3 ok( ! $scrubber->comment() ); # test 4 ok( ! $scrubber->process() ); # test 5 ok( ! $scrubber->allow( qw[ p b i u hr br ] ) ); # test 6 $scrubber = $scrubber->scrub($html); ok( $scrubber ); # test 7 ok( $scrubber !~ /href/i ); # test 8 ok( $scrubber !~ /Align/i ); # test 9 ok( $scrubber !~ /\Q