summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/dist/threads
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/dist/threads')
-rwxr-xr-xgnu/usr.bin/perl/dist/threads/t/libc.t5
-rw-r--r--gnu/usr.bin/perl/dist/threads/t/version.t31
-rw-r--r--gnu/usr.bin/perl/dist/threads/threads.h0
3 files changed, 32 insertions, 4 deletions
diff --git a/gnu/usr.bin/perl/dist/threads/t/libc.t b/gnu/usr.bin/perl/dist/threads/t/libc.t
index 65958949f6c..592b8d350e4 100755
--- a/gnu/usr.bin/perl/dist/threads/t/libc.t
+++ b/gnu/usr.bin/perl/dist/threads/t/libc.t
@@ -9,11 +9,8 @@ BEGIN {
skip_all(q/Perl not compiled with 'useithreads'/);
}
- my $time_out_factor = $ENV{PERL_TEST_TIME_OUT_FACTOR} || 1;
- $time_out_factor = 1 if $time_out_factor < 1;
-
# Guard against bugs that result in deadlock
- watchdog(1 * 60 * $time_out_factor);
+ watchdog(1 * 60);
plan(11);
}
diff --git a/gnu/usr.bin/perl/dist/threads/t/version.t b/gnu/usr.bin/perl/dist/threads/t/version.t
new file mode 100644
index 00000000000..fb9130903aa
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/threads/t/version.t
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN {
+ use Config;
+ if (! $Config{'useithreads'}) {
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
+ exit(0);
+ }
+}
+
+use threads;
+
+# test that the version documented in threads.pm pod matches
+# that of the code.
+
+open my $fh, "<", $INC{"threads.pm"}
+ or die qq(Failed to open '$INC{"threads.pm"}': $!);
+my $file= do { local $/; <$fh> };
+close $fh;
+my $pod_version = 0;
+if ($file=~/This document describes threads version (\d.\d+)/) {
+ $pod_version = $1;
+}
+is($pod_version, $threads::VERSION,
+ "Check that pod and \$threads::VERSION match");
+done_testing();
+
+
+
diff --git a/gnu/usr.bin/perl/dist/threads/threads.h b/gnu/usr.bin/perl/dist/threads/threads.h
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/threads/threads.h