File: 01_simple.t

package info (click to toggle)
libhtml-escape-perl 1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 312 kB
  • sloc: perl: 59; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use utf8;
use Test::More;
use HTML::Escape;

ok(HTML::Escape::USE_XS, "uses XS module") or do {
    eval { XSLoader::load('HTML::Escape', $HTML::Escape::VERSION) };
    diag $@ if $@;
};
is(escape_html("<^o^>"), '&lt;^o^&gt;');
is(escape_html("'"), "&#39;");
is(escape_html("\0>"), "\0&gt;");
is(escape_html("`"), "&#96;");
is(escape_html("{}"), "&#123;&#125;");

done_testing;