Subject: | [PATCH] Test::Simple 0.53 fails install on pre 5.8 due to t/sort_bug.t requiring threads.pm |
t/sort_bug.t forgot to do the perl version and require threads test used in the other tests. attached patch fixes it.
Also a note, fork() does work under win32 since at least 5.6, surely that test should be reworked to run when it can.
Cheers,
yves
diff -wurd build\Test-Simple-0.53/t/sort_bug.t patched\Test-Simple-0.53/t/sort_bug.t
--- build\Test-Simple-0.53/t/sort_bug.t 2004-11-26 23:38:52.000000000 +0100
+++ patched\Test-Simple-0.53/t/sort_bug.t 2004-12-07 12:38:14.683750000 +0100
@@ -15,9 +15,13 @@
use strict;
use Config;
-
BEGIN {
- require threads if $Config{useithreads};
+ unless ( $] >= 5.008 && $Config{'useithreads'} &&
+ eval { require threads; 'threads'->import; 1; })
+ {
+ print "1..0 # Skip: no threads\n";
+ exit 0;
+ }
}
use Test::More;
@@ -26,12 +30,7 @@
# Fails with $nthreads = 2 and with eq_set().
my $nthreads = 2;
-if( $Config{useithreads} ) {
plan tests => $nthreads;
-}
-else {
- plan skip_all => 'no threads';
-}
sub do_one_thread {