File: 99-manifest.t

package info (click to toggle)
libtest-without-module-perl 0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 100 kB
  • ctags: 10
  • sloc: perl: 139; makefile: 15
file content (22 lines) | stat: -rwxr-xr-x 570 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
use Test::More;

# Check that MANIFEST and MANIFEST.skip are sane :

use File::Find;
use File::Spec;

my @files = qw( MANIFEST MANIFEST.skip );
plan tests => scalar @files * 4;

for my $file (@files) {
  ok(-f $file, "$file exists");
  open F, "<$file"
    or die "Couldn't open $file : $!";
  my @lines = <F>;
  is_deeply([grep(/^$/, @lines)],[], "No empty lines in $file");
  is_deeply([grep(/^\s+$/, @lines)],[], "No whitespace-only lines in $file");
  is_deeply([grep(/^\s*\S\s+$/, @lines)],[],"No trailing whitespace on lines in $file");
  close F;
};