3 # Test the well-formed-ness of the MANIFEST file.
16 my $manifest = File::Spec->catfile(File::Spec->updir(), 'MANIFEST');
18 open my $m, '<', $manifest or die "Can't open '$manifest': $!";
20 # Test that MANIFEST uses tabs - not spaces - after the name of the file.
23 next unless /\s/; # Ignore lines without whitespace (i.e., filename only)
24 my ($file, $separator) = /^(\S+)(\s+)/;
25 isnt($file, undef, "Line $. doesn't start with a blank") or next;
26 if ($separator !~ tr/\t//c) {
29 } elsif ($separator !~ tr/ //c) {
31 fail("Spaces in entry for $file");
32 } elsif ($separator =~ tr/\t//) {
33 fail("Mixed tabs and spaces in entry for $file");
35 fail("Odd whitespace in entry for $file");
41 # Test that MANIFEST is properly sorted
43 skip("'Porting/manisort' not found", 1) if (! -f '../Porting/manisort');
45 my $result = runperl('progfile' => '../Porting/manisort',
46 'args' => [ '-c', '../MANIFEST' ],
49 like($result, qr/is sorted properly/, 'MANIFEST sorted properly');