use strict; use warnings; use Test::More tests => 10; use HTML::ExtractContent::Util; # strip is(strip(""), ""); # empty is(strip(" \t\r\nfoo"), "foo"); # left is(strip("bar \t \r \n"), "bar"); # right is(strip(" \t\r hoge\t\t\r\n"), "hoge"); # both # strip_tags is(strip_tags("url: http://example.com/"), "url: http://example.com/"); is(strip_tags("
\n

hoge foo.

\n

bar tarao.

\n
"), "\n hoge foo.\n bar tarao.\n"); # eliminate_tags is(eliminate_tags("url: http://example.com/", 'a'), "url: "); is(eliminate_tags("
\n

hoge foo.

\n

bar tarao.

\n
", 'p'), "
\n \n \n
"); # eliminate_links is(eliminate_links("url: http://example.com/"), "url: "); is(eliminate_links("
\n

hoge foo.

\n

bar tarao.

\n
"), "
\n

hoge foo.

\n

bar tarao.

\n
");