summaryrefslogtreecommitdiff
path: root/t/35huge_mode.t
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2022-07-25 08:44:28 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2022-07-25 08:44:28 +0900
commit386653a5f530a4e00811bacc50ae734d5610695d (patch)
treec6f6c4e3d74f202bd65a80e06992debe83e4e1ab /t/35huge_mode.t
parentbed2f52e9348362135cc7cc4e6cedfe306744b20 (diff)
downloadperl-XML-LibXML-386653a5f530a4e00811bacc50ae734d5610695d.tar.gz
perl-XML-LibXML-386653a5f530a4e00811bacc50ae734d5610695d.tar.bz2
perl-XML-LibXML-386653a5f530a4e00811bacc50ae734d5610695d.zip
Imported Upstream version 2.0202upstream/2.0202
Diffstat (limited to 't/35huge_mode.t')
-rw-r--r--t/35huge_mode.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/35huge_mode.t b/t/35huge_mode.t
index adf03da..1ccb334 100644
--- a/t/35huge_mode.t
+++ b/t/35huge_mode.t
@@ -49,11 +49,14 @@ my($parser, $doc);
$parser = XML::LibXML->new;
#$parser->set_option(huge => 0);
+# TEST
ok(!$parser->get_option('huge'), "huge mode disabled by default");
$doc = eval { $parser->parse_string($evil_xml); };
+# TEST
isnt("$@", "", "exception thrown during parse");
+# TEST
like($@, qr/entity.*loop/si, "exception refers to entity reference loop");
@@ -61,9 +64,11 @@ $parser = XML::LibXML->new;
$doc = eval { $parser->parse_string($benign_xml); };
+# TEST
is("$@", "", "no exception thrown during parse");
my $body = $doc->findvalue( '/lolz' );
+# TEST
is($body, 'haha', 'entity was parsed and expanded correctly');
exit;