Skip to content

Commit 2509893

Browse files
committed
Fix incorrect use of skip in tests
Fixes #7. Fixes #9. Fixes rt.cpan.org 95922.
1 parent 05368ff commit 2509893

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

t/mktemp.t

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ my $status = unlink0($fh, $template);
5454
if ($status) {
5555
ok( $status );
5656
} else {
57-
skip("Skip test failed probably due to \$TMPDIR being on NFS",1);
57+
SKIP: {
58+
skip("Skip test failed probably due to \$TMPDIR being on NFS",1);
59+
}
5860
}
5961

6062
# MKSTEMPS
@@ -77,7 +79,9 @@ $status = unlink0($fh, $fname);
7779
if ($status) {
7880
ok($status);
7981
} else {
80-
skip("Skip test failed probably due to cwd being on NFS",1)
82+
SKIP: {
83+
skip("Skip test failed probably due to cwd being on NFS",1)
84+
}
8185
}
8286

8387
# MKDTEMP

t/posix.t

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ my $status = unlink0($fh, $tmpnam);
3434
if ($status) {
3535
ok( $status );
3636
} else {
37-
skip("Skip test failed probably due to \$TMPDIR being on NFS",1);
37+
SKIP: {
38+
skip("Skip test failed probably due to \$TMPDIR being on NFS",1);
39+
}
3840
}
3941

4042
# TMPFILE
@@ -67,7 +69,9 @@ if (defined $fh) {
6769
} else {
6870
# Skip all the remaining tests
6971
foreach (1..3) {
70-
skip("Skip test failed probably due to \$TMPDIR being on NFS",1);
72+
SKIP: {
73+
skip("Skip test failed probably due to \$TMPDIR being on NFS",1);
74+
}
7175
}
7276
}
7377

t/tempfile.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ if ($fh) {
165165
ok( close($fh), "Close temp file" );
166166

167167
} else {
168-
skip "Skip Failed probably due to NFS", 1;
169-
skip "Skip Failed probably due to NFS", 1;
168+
SKIP: {
169+
skip "Skip Failed probably due to NFS", 2;
170+
}
170171
}
171172

172173
# Create temp directory and chdir to it; it should still be removed on exit.

0 commit comments

Comments
 (0)