#!/usr/bin/perl -w
use Test::More tests => 9;
use strict;
BEGIN {
use_ok ('HTML::Widgets::NavMenu::EscapeHtml'); # TEST
}
{
# TEST
is (escape_html("hello"), "hello", "Simple 1");
# TEST
is (escape_html("hi\nYou rule."), "hi\nYou rule.", "Simple 2 with WS");
# TEST
is (escape_html("D&D"), "D&D", "Ampersand");
# TEST
is (escape_html("<b>Hello</b>"), "<b>Hello</b>", "Tags");
# TEST
is (escape_html("&"), "&amp;", "Double amp");
# TEST
is (escape_html("&<hello>"), "&<hello>", "Seq of 2");
# TEST
is (escape_html(q{Hi "phony"}), q{Hi "phony"}, "Double quotes");
# TEST
is (escape_html(q{"<&>"}), q{"<&>"}, "All in one");
}