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 # Remember, we're running from t/
27 ok(-f "../$file", "File $file exists");
28 if ($separator !~ tr/\t//c) {
31 } elsif ($separator !~ tr/ //c) {
33 fail("Spaces in entry for $file");
34 } elsif ($separator =~ tr/\t//) {
35 fail("Mixed tabs and spaces in entry for $file");
37 fail("Odd whitespace in entry for $file");
43 # Test that MANIFEST is properly sorted
45 skip("'Porting/manisort' not found", 1) if (! -f '../Porting/manisort');
47 my $result = runperl('progfile' => '../Porting/manisort',
48 'args' => [ '-c', '../MANIFEST' ],
51 like($result, qr/is sorted properly/, 'MANIFEST sorted properly');