File: stack.t

package info (click to toggle)
libhtml-restrict-perl 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 336 kB
  • sloc: perl: 739; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 396 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;

use Test::More;
use HTML::Restrict;

my $hr = HTML::Restrict->new;

ok( !@{ $hr->_stripper_stack }, "stack empty" );

push @{ $hr->_stripper_stack }, 'script', 'style', 'pre', 'script';
$hr->_delete_tag_from_stack('script');
is_deeply(
    $hr->_stripper_stack,
    [ 'script', 'style', 'pre' ],
    'deletes from stack in correct order and amount'
);

done_testing();