File: makerel.t

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (38 lines) | stat: -rw-r--r-- 874 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!./perl -w

# What does this test?
# This tests that files referenced in Porting/makerel exist
# This is important because otherwise the missing files will
# only be discovered when actually attempting a release
#
# It's broken - how do I fix it?
# EIther make sure that the file referenced by Porting/makerel exists
# or delete the line in Porting/makerel referencing that file

use Config;
BEGIN {
    @INC = '..' if -f '../TestInit.pm';
}
use TestInit qw(T); # T is chdir to the top level

require './t/test.pl';

plan('no_plan');

my $makerel = 'Porting/makerel';

open my $m, '<', $makerel or die "Can't open '$makerel': $!";
my @files;
while (<$m>) {
    if( /\@writables = /../\)/ ) {
        if( /^\s+(\S+)/ ) {
            my $file = $1;
            push @files, $file;
            ok(-f $file, "File $file exists");
        };
    }
}

close $m or die $!;

# EOF