summaryrefslogtreecommitdiff
path: root/t/op/getpid.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-07 19:25:13 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-07 19:25:13 +0000
commit9c8416b2f966e2868aea89c8c24ff2774a4c6d75 (patch)
treebd05f2c6525d53ea3954c207f9e4870cf21fce0d /t/op/getpid.t
parent991b87804e286479de011fbef06fb073174aed77 (diff)
downloadperl-9c8416b2f966e2868aea89c8c24ff2774a4c6d75.tar.gz
Add skip_all_without_config() to test.pl, and use it in 6 tests.
This abstracts out the common idiom of loading Config, checking if a particular key is true, and if not implementing a "skip all" with an appropriate reason.
Diffstat (limited to 't/op/getpid.t')
-rw-r--r--t/op/getpid.t9
1 files changed, 1 insertions, 8 deletions
diff --git a/t/op/getpid.t b/t/op/getpid.t
index b51b0646fc..ac066d562d 100644
--- a/t/op/getpid.t
+++ b/t/op/getpid.t
@@ -12,14 +12,7 @@ use strict;
use Config;
BEGIN {
- if (!$Config{useithreads}) {
- print "1..0 # Skip: no ithreads\n";
- exit;
- }
- if (!$Config{d_getppid}) {
- print "1..0 # Skip: no getppid\n";
- exit;
- }
+ skip_all_without_config($_) foreach qw(useithreads d_getppid);
if ($ENV{PERL_CORE_MINITEST}) {
print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
exit 0;