X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsimple.t;h=cb788abcda48b3c99c80e9f1f49f61298cb6717b;hb=cf61306dc93f5176e1fd15d2f6ac8338a8481dfd;hp=40ffbad4a55b7d26163599a9d2dda2bf7eba3def;hpb=b8aaa17d237994dae86b61a6aa96040fff75f425;p=scpubgit%2FHTML-String.git
diff --git a/t/simple.t b/t/simple.t
index 40ffbad..cb788ab 100644
--- a/t/simple.t
+++ b/t/simple.t
@@ -25,7 +25,7 @@ $three .= html('');
is("$three", 'Hi <bob>');
my $four; {
- use HTML::String::Overload { ignore => { lies => 1 } };
+ use HTML::String::Overload { ignore => { non_existant_package_name => 1 } };
#$four = "".$hi."\n";
$four = "$hi"."\n";
@@ -47,4 +47,20 @@ is(html('MyPkg')->new, 'foo');
is(html('MyPkg')->load, 'bar');
+# Test that all characters that should be escaped are escaped
+
+my $raw_characters = q{<>&"'};
+my $expected_output = q{<>&"'};
+my $html = html('').$raw_characters.html('');
+is($html, $expected_output);
+
+ok(HTML::String::Value->isa('HTML::String::Value'), 'isa on class ok');
+
+is($@, '', '$@ not set by check');
+
+is do {
+ use HTML::String::Overload;
+ '' . '0'
+}, '0', 'concatenating strings which are false in boolean context';
+
done_testing;