File: t92samples.t

package info (click to toggle)
libimager-perl 0.75-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,532 kB
  • ctags: 3,278
  • sloc: ansic: 24,109; perl: 21,732; makefile: 13
file content (24 lines) | stat: -rw-r--r-- 577 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
20
21
22
23
24
#!perl -w
# packaging test - make sure we included the samples in the MANIFEST <sigh>
use Test::More;
use ExtUtils::Manifest qw(maniread);

# first build a list of samples from samples/README
open SAMPLES, "< samples/README"
  or die "Cannot open samples/README: $!";
my @sample_files;
while (<SAMPLES>) {
  chomp;
  /^\w[\w.-]+\.\w+$/ and push @sample_files, $_;
}

close SAMPLES;

plan tests => scalar(@sample_files);

my $manifest = maniread();

for my $filename (@sample_files) {
  ok(exists($manifest->{"samples/$filename"}), 
     "sample file $filename in manifest");
}