2 use Test::More tests => 8;
5 my $p = HTML::Parser->new();
11 my($tag, $attr, $attrseq) = @_;
13 for my $k (sort keys %$attr) {
17 if (@$attrseq) { $text.=" Order:" ; }
18 for my $k (@$attrseq) {
22 }, "tagname,attr,attrseq");
30 <tAg aRg="Value" arg="other value"></tAg>
32 my $cs = 'S[tAg aRg=Value arg=other value Order: aRg arg]E[tAg]';
33 my $ci = 'S[tag arg=Value Order: arg arg]E[tag]';
35 $p->parse($html)->eof;
39 $p->case_sensitive(0);
40 $p->parse($html)->eof;
44 $p->case_sensitive(1);
46 $p->parse($html)->eof;
50 $p->case_sensitive(0);
51 $p->parse($html)->eof;
55 <tAg aRg="Value" arg="other value"></tAg>
58 $p->ignore_tags('ignore');
59 $cs = 'S[tAg aRg=Value arg=other value Order: aRg arg]E[tAg]S[iGnOrE]';
60 $ci = 'S[tag arg=Value Order: arg arg]E[tag]';
63 $p->case_sensitive(0);
65 $p->parse($html)->eof;
69 $p->case_sensitive(1);
71 $p->parse($html)->eof;
75 $p->case_sensitive(0);
77 $p->parse($html)->eof;
81 $p->case_sensitive(1);
83 $p->parse($html)->eof;