File: load_file.t

package info (click to toggle)
libtest-fixme-perl 0.14-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 224 kB
  • ctags: 6
  • sloc: perl: 127; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 597 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;

use Test::More tests => 4;

# Load the module.
use_ok 'Test::Fixme';

{    # Test loading of simple file.
    my $content  = Test::Fixme::load_file('t/dirs/normal/one.txt');
    my $expected = "abcdef\nghijkl\nmnopqr\nstuvwx\n\n12345\n67890\n";
    is $content, $expected, "check simple file";
}

{    # Test loading of non-existent file.
    ok !defined Test::Fixme::load_file('t/i/do/not/exist'),
      "load non-existent file";
}

{    # Test loading of a zero length file
    is Test::Fixme::load_file('t/dirs/normal/four.pod'), '',
      "load zero length file";
}