# Test that MANIFEST uses tabs - not spaces - after the name of the file. while (<$m>) { chomp; unless( /\s/ ) { push @files, $_; # no need for further tests on lines without whitespace (i.e., filename only) next; } my ($file, $separator) = /^(\S+)(\s+)/; push @files, $file; isnt($file, undef, "Line $. doesn't start with a blank") or next; # Remember, we're running from t/ ok(-f "../$file", "File $file exists"); #### SKIP: { skip("\$0 check only on Linux and FreeBSD", 2) unless $^O =~ /^(linux|freebsd)$/ && open CMDLINE, "/proc/$$/cmdline"; chomp(my $line = scalar ); my $me = (split /\0/, $line)[0]; is $me, $0, 'altering $0 is effective (testing with /proc/)'; close CMDLINE; # perlbug #22811 my $mydollarzero = sub { my($arg) = shift; $0 = $arg if defined $arg; # In FreeBSD the ps -o command= will cause # an empty header line, grab only the last line. my $ps = (`ps -o command= -p $$`)[-1]; return if $?; chomp $ps; printf "# 0[%s]ps[%s]\n", $0, $ps; $ps; }; my $ps = $mydollarzero->("x"); ok(!$ps # we allow that something goes wrong with the ps command