On Fri Nov 07 20:29:21 2014, EXODIST wrote:
Show quoted text>
https://github.com/Test-More/test-more/issues/485
>
> The Test::Builder alphas will go stable soon. This module breaks
> because of the new Test::* Internals.
>
> I am making a lot of effort to support legacy code, but this module
> goes a bit beyond what I can support. I would be happy to help you
> with any questions as far as updating it goes.
From 5918a7aa27805f582902f39bab1868f2cd73e339 Mon Sep 17 00:00:00 2001
From: Chad Granum <exodist7@gmail.com>
Date: Sat, 18 Apr 2015 22:45:50 +0200
Subject: [PATCH] Fix for Test::Stream
---
lib/Test/FITesque/Suite.pm | 10 ++++++----
lib/Test/FITesque/Test.pm | 10 ++++++----
t/03-test-run.t | 2 --
t/05-suite-run.t | 1 -
4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/lib/Test/FITesque/Suite.pm b/lib/Test/FITesque/Suite.pm
index f7e38e6..8a4ec85 100644
--- a/lib/Test/FITesque/Suite.pm
+++ b/lib/Test/FITesque/Suite.pm
@@ -113,10 +113,12 @@ sub run_tests {
if(!$pkg->isa('Test::FITesque::Suite')){
my $Builder = $TEST_BUILDER ? $TEST_BUILDER : Test::Builder->new();
$Builder->exported_to(__PACKAGE__);
- if( my $count = $self->test_count() ){
- $Builder->expected_tests($count);
- } else {
- $Builder->no_plan();
+ if ( $Builder->isa('Test::FakeBuilder') || !$Builder->has_plan) {
+ if( my $count = $self->test_count() ){
+ $Builder->expected_tests($count);
+ } else {
+ $Builder->no_plan();
+ }
}
}
diff --git a/lib/Test/FITesque/Test.pm b/lib/Test/FITesque/Test.pm
index 06e6d93..9b9092d 100644
--- a/lib/Test/FITesque/Test.pm
+++ b/lib/Test/FITesque/Test.pm
@@ -134,10 +134,12 @@ sub run_tests {
my $Builder = $TEST_BUILDER ? $TEST_BUILDER : Test::Builder->new();
$Builder->exported_to(__PACKAGE__);
- if( my $count = $self->test_count() ){
- $Builder->expected_tests($count);
- } else {
- $Builder->no_plan();
+ if ( $Builder->isa('Test::FakeBuilder') || !$Builder->has_plan) {
+ if( my $count = $self->test_count() ){
+ $Builder->expected_tests($count);
+ } else {
+ $Builder->no_plan();
+ }
}
}
diff --git a/t/03-test-run.t b/t/03-test-run.t
index 9945ac0..d4c7b5d 100644
--- a/t/03-test-run.t
+++ b/t/03-test-run.t
@@ -16,7 +16,6 @@ Basic_test_builder_sanity: {
$test->add('click me');
$test->add('fail_this');
- test_out("1..4");
test_out("ok 1 - foo ran just fine");
test_out("ok 2 - click_me: first");
test_out("ok 3 - click_me: second");
@@ -37,7 +36,6 @@ Extra_debugging_detail: {
$test->add('click me');
$test->add('fail_this');
- test_out("1..4");
test_out("ok 1 - foo ran just fine");
test_out("ok 2 - click_me: first");
test_out("ok 3 - click_me: second");
diff --git a/t/05-suite-run.t b/t/05-suite-run.t
index cdbe85c..e49f79a 100644
--- a/t/05-suite-run.t
+++ b/t/05-suite-run.t
@@ -32,7 +32,6 @@ $test3->add('baz');
$suite->add($inner_suite, $test3);
-test_out("1..6");
test_out("not ok 1 - foo fails");
test_out("ok 2 - bar: first");
test_out("ok 3 - bar: second");
--
1.9.1