File: stack.t

package info (click to toggle)
libhtml-restrict-perl 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: perl: 842; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 399 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();