File: 08_indent.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 (15 lines) | stat: -rw-r--r-- 311 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use warnings;

use Test2::V0;

use Web::Query;

plan tests => 2;

my $inner = "<head></head><body><p>Hi there</p></body>";
my $html = "<html>$inner</html>";

is( Web::Query->new($html)->html => $inner, "no indent" );

like( Web::Query->new($html, { indent => "\t" } )->html => qr/\t/, "indented" );