File: 03_output.t

package info (click to toggle)
libtemplate-plugin-html-strip-perl 0.01-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 84 kB
  • sloc: perl: 21; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 895 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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use strict;
use Template::Test;

test_expect(\*DATA);

__END__
--test--
[% USE HTML.Strip -%]
[% FILTER html_strip -%]
<p>The power to enact removals has ultimately fallen into the wrong hands.</p>
[%- END %]
--expect--
The power to enact removals has ultimately fallen into the wrong hands.

--test--
[% USE HTML.Strip 'strip' -%]
[% FILTER strip -%]
<a href="http://heightenedconcern.org">Even to remove attributes and their values!?</a>
[%- END %]
--expect--
Even to remove attributes and their values!?

--test--
[% USE HTML.Strip -%]
[% FILTER html_strip
    striptags = [ 'strong' 'small' ]
-%]
<strong>Even their contents!</strong>
<small>I am afraid.</small>
[%- END %]
--expect--


--test--
[% USE HTML.Strip -%]
[% FILTER html_strip
    emit_spaces = 0
-%]
<p><b>I<i>strongly</i>suggest<em>we</em><u>leave</u>immediately.</b>
[%- END %]
--expect--
Istronglysuggestweleaveimmediately.