Aion-Format
view release on metacpan or search on metacpan
t/aion/format/html.t view on Meta::CPAN
use common::sense; use open qw/:std :utf8/; use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//; use Test::More 0.98; use String::Diff q...
# # NAME
#
# Aion::Format::Html - библиоÑека Ð´Ð»Ñ ÑоÑмаÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ HTML
#
# # SYNOPSIS
#
subtest 'SYNOPSIS' => sub {
use Aion::Format::Html;
local ($::_g0 = do {from_html "<b>!</b>"}, $::_e0 = "!"); ::ok $::_g0 eq $::_e0, 'from_html "<b>!</b>" # => !' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {to_html "<a>"}, $::_e0 = "<a>"); ::ok $::_g0 eq $::_e0, 'to_html "<a>" # => <a>' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
#
# # DESCRIPION
#
# ÐиблиоÑека Ð´Ð»Ñ ÑоÑмаÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ HTML-докÑменÑов.
#
# # SUBROUTINES
#
# ## from_html ($html)
#
# ÐÑеобÑазÑÐµÑ HTML в ÑекÑÑ.
#
::done_testing; }; subtest 'from_html ($html)' => sub {
local ($::_g0 = do {from_html "Basic is <b>superlanguage</b>!<br>"}, $::_e0 = "Basic is superlanguage!\n"); ::ok $::_g0 eq $::_e0, 'from_html "Basic is <b>superlanguage</b>!<br>" # => Basic is superlanguage!\n' or ::diag ::_string_diff($::_g0, $::_e...
#
# ## to_html ($html)
#
# ÐкÑаниÑÑÐµÑ ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ HTML.
#
# ## safe_html ($html)
#
# ÐбÑÐµÐ·Ð°ÐµÑ Ð¾Ð¿Ð°ÑнÑе и неизвеÑÑнÑе Ñеги HTML, а Ñакже неизвеÑÑнÑе аÑÑибÑÑÑ Ð¸Ð· извеÑÑнÑÑ
Ñегов.
#
::done_testing; }; subtest 'safe_html ($html)' => sub {
local ($::_g0 = do {safe_html "-<em>-</em><br>-"}, $::_e0 = "-<em>-</em><br>-"); ::ok $::_g0 eq $::_e0, 'safe_html "-<em>-</em><br>-" # => -<em>-</em><br>-' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {safe_html "-<em onclick=' '>-</em><br onmouseout=1>-"}, $::_e0 = "-<em>-</em><br>-"); ::ok $::_g0 eq $::_e0, 'safe_html "-<em onclick=\' \'>-</em><br onmouseout=1>-" # => -<em>-</em><br>-' or ::diag ::_string_diff($::_g0, $::_e0...
local ($::_g0 = do {safe_html "-<xx24>-</xx24>"}, $::_e0 = "--"); ::ok $::_g0 eq $::_e0, 'safe_html "-<xx24>-</xx24>" # => --' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {safe_html "-< applet >-</ applet >"}, $::_e0 = "-< applet >-"); ::ok $::_g0 eq $::_e0, 'safe_html "-< applet >-</ applet >" # => -< applet >-' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
#
# ## split_on_pages ($html, $symbols_on_page, $by)
#
# Ð Ð°Ð·Ð±Ð¸Ð²Ð°ÐµÑ ÑекÑÑ Ð½Ð° ÑÑÑаниÑÑ Ñ ÑÑеÑом html-Ñегов.
#
::done_testing; }; subtest 'split_on_pages ($html, $symbols_on_page, $by)' => sub {
local ($::_g0 = do {[split_on_pages "Alice in wonderland. This is book", 17]}, $::_e0 = do {["Alice in wonderland. ", "This is book"]}); ::is_deeply $::_g0, $::_e0, '[split_on_pages "Alice in wonderland. This is book", 17] # --> ["Alice in wonderlan...
#
# # AUTHOR
#
# Yaroslav O. Kosmina <darviarush@mail.ru>
#
# # LICENSE
#
# â **GPLv3**
#
# # COPYRIGHT
#
( run in 1.609 second using v1.01-cache-2.11-cpan-39bf76dae61 )