summaryrefslogtreecommitdiff
path: root/t/op/stat.t
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2004-12-20 08:08:56 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-01-21 10:57:48 +0000
commit049f818b9a6d0ed6efed5c49515a9d137e475267 (patch)
tree5986ea8db8fda2cca01e2b69759fdb3474dd757b /t/op/stat.t
parenta01b8a532e28fdf8a628e0be61983a5719a52753 (diff)
downloadperl-049f818b9a6d0ed6efed5c49515a9d137e475267.tar.gz
Re: [PATCH] File::Find dies on find({follow=>1, ...}) on Win32
Message-ID: <20041221000856.GA2924@efn.org> p4raw-id: //depot/perl@23842
Diffstat (limited to 't/op/stat.t')
-rwxr-xr-xt/op/stat.t26
1 files changed, 16 insertions, 10 deletions
diff --git a/t/op/stat.t b/t/op/stat.t
index 6afbadc841..c553a16f7f 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -9,7 +9,7 @@ BEGIN {
use Config;
use File::Spec;
-plan tests => 78;
+plan tests => 80;
my $Perl = which_perl();
@@ -406,16 +406,22 @@ unlink $tmpfile or print "# unlink failed: $!\n";
my @r = \stat($Curdir);
is(scalar @r, 13, 'stat returns full 13 elements');
+stat $0;
+eval { lstat _ };
+like( $@, qr/^The stat preceding lstat\(\) wasn't an lstat/,
+ 'lstat _ croaks after stat' );
+eval { -l _ };
+like( $@, qr/^The stat preceding -l _ wasn't an lstat/,
+ '-l _ croaks after stat' );
+
+lstat $0;
+eval { lstat _ };
+is( "$@", "", "lstat _ ok after lstat" );
+eval { -l _ };
+is( "$@", "", "-l _ ok after lstat" );
+
SKIP: {
- skip "No lstat", 4 unless $Config{d_lstat};
-
- stat $0;
- eval { lstat _ };
- like( $@, qr/^The stat preceding lstat\(\) wasn't an lstat/,
- 'lstat _ croaks after stat' );
- eval { -l _ };
- like( $@, qr/^The stat preceding -l _ wasn't an lstat/,
- '-l _ croaks after stat' );
+ skip "No lstat", 2 unless $Config{d_lstat};
# bug id 20020124.004
# If we have d_lstat, we should have symlink()