Add the following packages libalgorithm-diff-perl libspiffy-perl libtext-diff-perl...
[pkg-perl] / deb-src / libtest-base-perl / libtest-base-perl-0.54 / t / write_file.t
1 use t::BaseTest tests => 4;
2
3 my $file = 't/output/foo.txt';
4
5 ok not(-e $file), "$file doesn't already exist";
6
7 first_block;
8
9 ok -e $file, "$file exists";
10
11 open my $fh, $file
12   or die "Can't open '$file' for input:\n$!";
13 is join('', <$fh>),
14    "One two\nBuckle my shoe\n",
15    '$file content is right';
16
17 is first_block->poem, $file, 'Returns file name';
18
19 __END__
20
21 ===
22 --- poem write_file=t/output/foo.txt
23 One two
24 Buckle my shoe