summaryrefslogtreecommitdiff
path: root/ext/HTML/Parser/t/magic.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/HTML/Parser/t/magic.t')
-rw-r--r--ext/HTML/Parser/t/magic.t41
1 files changed, 0 insertions, 41 deletions
diff --git a/ext/HTML/Parser/t/magic.t b/ext/HTML/Parser/t/magic.t
deleted file mode 100644
index 366f275236..0000000000
--- a/ext/HTML/Parser/t/magic.t
+++ /dev/null
@@ -1,41 +0,0 @@
-# Check that the magic signature at the top of struct p_state works and that we
-# catch modifications to _hparser_xs_state gracefully
-
-use Test::More tests => 5;
-
-use HTML::Parser;
-
-$p = HTML::Parser->new(api_version => 3);
-
-$p->xml_mode(1);
-
-# We should not be able to simply modify this stuff
-eval {
- ${$p->{_hparser_xs_state}} += 4;
-};
-like($@, qr/^Modification of a read-only value attempted/);
-
-
-my $x = delete $p->{_hparser_xs_state};
-
-eval {
- $p->xml_mode(1);
-};
-like($@, qr/^Can't find '_hparser_xs_state'/);
-
-$p->{_hparser_xs_state} = \($$x + 16);
-
-eval {
- $p->xml_mode(1);
-};
-like($@, $] >= 5.008 ? qr/^Lost parser state magic/ : qr/^Bad signature in parser state object/);
-
-$p->{_hparser_xs_state} = 33;
-eval {
- $p->xml_mode(1);
-};
-like($@, qr/^_hparser_xs_state element is not a reference/);
-
-$p->{_hparser_xs_state} = $x;
-
-ok($p->xml_mode(0));