From d17a90ed8f8569f2142099686406b71f1aaa2e4a Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 28 Jun 2015 03:06:27 -0400 Subject: [PATCH] manual TAP in global destruction test Test::Builder tries to do a lot of friendly things that get in the way when we need to fully control the lifecycle of variables. It's more reliable to output the TAP manually in this case. --- t/demolish-global_destruction.t | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/t/demolish-global_destruction.t b/t/demolish-global_destruction.t index a6122ba..388248e 100644 --- a/t/demolish-global_destruction.t +++ b/t/demolish-global_destruction.t @@ -1,10 +1,23 @@ use Moo::_strictures; no warnings 'once'; -use Test::More tests => 2; use POSIX (); -Test::More->builder->no_ending(1); + +$| = 1; our $fail = 2; +our $tests = 0; +sub ok { + my ($ok, $message) = @_; + print + +($ok ? '' : 'not ') + . 'ok ' . ++$tests + . ($message ? " - $message" : '') + . "\n"; + return $ok; +} + +print "1..2\n"; + BEGIN { package Foo; use Moo; -- 2.22.0