summaryrefslogtreecommitdiff
path: root/t/argspec2.t
diff options
context:
space:
mode:
Diffstat (limited to 't/argspec2.t')
-rw-r--r--t/argspec2.t21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/argspec2.t b/t/argspec2.t
new file mode 100644
index 0000000..6f594b9
--- /dev/null
+++ b/t/argspec2.t
@@ -0,0 +1,21 @@
+use Test::More tests => 2;
+
+use strict;
+use HTML::Parser;
+
+my @start;
+my @text;
+
+my $p = HTML::Parser->new(api_version => 3);
+$p->handler(start => \@start, '@{tagname, @attr}');
+$p->handler(text => \@text, '@{dtext}');
+$p->parse(<<EOT)->eof;
+Hi
+<a href="abc">Foo</a><b>:-)</b>
+EOT
+
+is("@start", "a href abc b");
+
+is(join("", @text), "Hi\nFoo:-)\n");
+
+