File: parse.t

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

use 5.010001;
use strict;
use warnings;

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

use HTML::Tidy5;

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

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';