use Config;
use File::Spec;
-plan tests => 75;
+plan tests => 73;
my $Perl = which_perl();
ok(! -B FOO, ' !-B');
$_ = <FOO>;
- ok(/perl/, 'after readline');
+ like($_, qr/perl/, 'after readline');
ok(-T FOO, ' still -T');
ok(! -B FOO, ' still -B');
close(FOO);
open(FOO,'op/stat.t');
$_ = <FOO>;
- ok(/perl/, 'reopened and after readline');
+ like($_, qr/perl/, 'reopened and after readline');
ok(-T FOO, ' still -T');
ok(! -B FOO, ' still !-B');
is(scalar @r, 13, 'stat returns full 13 elements');
SKIP: {
- skip "No lstat", 2 unless $Config{d_lstat};
+ skip "No lstat", 4 unless $Config{d_lstat};
stat $0;
eval { lstat _ };
like( $@, qr/^The stat preceding -l _ wasn't an lstat/,
'-l _ croaks after stat' );
- eval { lstat STDIN };
- like( $@, qr/^You can't use lstat\(\) on a filehandle/,
- 'lstat FILEHANDLE croaks' );
- eval { -l STDIN };
- like( $@, qr/^You can't use -l on a filehandle/,
- '-l FILEHANDLE croaks' );
-
# bug id 20020124.004
# If we have d_lstat, we should have symlink()
my $linkname = 'dolzero';