summaryrefslogtreecommitdiff
path: root/t/argspec2.t
blob: 6f594b97b603ae4731c8bde4dad92e9f63bcc5e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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");