use Test::More tests => 14;
use strict;
use HTTP::Proxy::BodyFilter::tags;
my $filter = HTTP::Proxy::BodyFilter::tags->new();
# test the filter
for (
[ 'foo bar', '', 'foo bar', '' ],
[ 'foo', '', 'foo', '' ],
[ '>', '', '>', '' ],
[ '>foo', '', '>foo', '' ],
[ '>foofoo', 'foofoo --> > <>><', '', ' > <>>', '<'],
# the following fails because of the implementation of the tags.pm
# a stronger implementation requires parsing
# [ 'xfilter( \$data, undef, undef,
( defined $buffer ? \$buffer : undef ) );
is( $data, $_->[2], "Correct data" );
is( $buffer, $_->[3], "Correct buffer" );
}