File: processing-instructions.t

package info (click to toggle)
libweb-query-perl 1.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: perl: 984; xml: 329; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use strict;
use warnings;

use lib 't/lib';

use Test2::V0;

use WQTest;

my $doc = <<'END';
<div>
    <?xml-stylesheet type="text/css" href="style.css"?>
    <p>stuff</p>
    <h1>alpha</h1>
        <p>aaa</p>
</div>
END

WQTest::test {
    my $class = shift;

    plan skip_all => "not working for $class"
        if $class eq 'Web::Query';

    like $class->new($doc)->find(\"//processing-instruction('xml-stylesheet')")->as_html
        => qr/style.css/;

}