You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
perl-Mouse/Mouse-2.4.2-Fix-test-code.p...

40 lines
1.2 KiB

From 43bd48014c89331cc0dadad78190890199469e81 Mon Sep 17 00:00:00 2001
From: Syohei YOSHIDA <syohex@gmail.com>
Date: Wed, 24 Jun 2015 18:02:57 +0900
Subject: [PATCH 2/2] Fix test code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In original code, mismatching plan error is occurred.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
t/900_mouse_bugs/017_issue29.t | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/t/900_mouse_bugs/017_issue29.t b/t/900_mouse_bugs/017_issue29.t
index 14c2900..bc93767 100644
--- a/t/900_mouse_bugs/017_issue29.t
+++ b/t/900_mouse_bugs/017_issue29.t
@@ -3,10 +3,13 @@
package main;
use strict;
use warnings;
-use Test::More skip_all => 'See https://github.com/gfx/p5-Mouse/issues/29';
-
-use Test::Requires qw(threads); # XXX: ithreads is discuraged!
+use constant HAS_THREADS => eval{ require threads && require threads::shared };
+use Test::More;
+use if !HAS_THREADS, 'Test::More',
+ (skip_all => "This is a test for threads ($@)");
+use if $Test::More::VERSION >= 2.00, 'Test::More',
+ (skip_all => "Test::Builder2 has bugs about threads");
{
package Foo;
--
2.1.0