File: parse_missing_file.t

package info (click to toggle)
libhtml-formattext-withlinks-perl 0.15-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 192 kB
  • sloc: perl: 246; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# $Id$

use Test::More tests => 5;
use HTML::FormatText::WithLinks;

my $f = HTML::FormatText::WithLinks->new( leftmargin => 0 );

ok($f, 'object created');

my $text = $f->parse_file('t/missing.html');

is($text, undef, 'undef returned for missing file');
is($f->error, 't/missing.html not found or not a regular file',
                'correct error message for missing file');

$text = $f->parse_file('.');

is($text, undef, 'undef returned for directory');
is($f->error, '. not found or not a regular file',
                'correct error message for directory');