From 71e0694ff91cdfc214a23ab2e5fb7014a0bbe295 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 23 Apr 2020 22:31:18 +0200 Subject: fix "The plan was already output" The error message being in some conditions: "The plan was already output at /usr/lib/perl5/5.22.3/Test/Builder.pm line 2510." We need both else we got: "Tests were run but no plan was declared and done_testing() was not seen." also fix inverted condition :-( --- t/superuser--suggests.t | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/t/superuser--suggests.t b/t/superuser--suggests.t index 8e1fbf48..2376b166 100644 --- a/t/superuser--suggests.t +++ b/t/superuser--suggests.t @@ -17,10 +17,12 @@ use lib '.', 't'; use helper; use urpm::util; use Test::More; -if (are_weak_deps_supported()) { - plan 'no_plan'; -} else { - plan skip_all => "Weak dependencies support is needed for those tests" ; +BEGIN { + if (are_weak_deps_supported()) { + plan 'no_plan'; + } else { + plan skip_all => "Weak dependencies support is needed for those tests" ; + } } -- cgit v1.2.1