File: parse.t

package info (click to toggle)
libhtml-tidy-perl 1.60-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 472 kB
  • sloc: perl: 1,289; sh: 23; makefile: 7
file content (18 lines) | stat: -rw-r--r-- 389 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl -T

use strict;
use warnings;

use Test::Exception;
use Test::More tests => 2;

use HTML::Tidy;

my $tidy = HTML::Tidy->new;
isa_ok( $tidy, 'HTML::Tidy' );

my $expected_pattern = 'Usage: parse($filename,$str [, $str...])';
throws_ok {
    $tidy->parse('fake-filename.txt');
} qr/\Q$expected_pattern\E/,
'parse() dies when not given a string or array of strings to parse';