From acebdccc970491ca7f76af97cd6350428d64e239 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 17 Jan 2020 04:51:42 +0100 Subject: cpan_testers: fix a warning when skipping tests should have been in commit ad953e4c4bca7e5bd9f5b5664298e04272537479 --- t/superuser--mirrorlist.t | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/t/superuser--mirrorlist.t b/t/superuser--mirrorlist.t index f59259b7..2ebbfd7f 100644 --- a/t/superuser--mirrorlist.t +++ b/t/superuser--mirrorlist.t @@ -3,8 +3,16 @@ use strict; use lib '.', 't'; use helper; -use Test::More 'no_plan'; -plan skip_all => "Needs a Mageia specific patch that introduces Time::ZoneInfo->current_zone()" if !-e '/etc/mageia-release'; +use Test::More; +# Must be done before 'use urpm::cfg' else we got: +# '1..0 # SKIP Needs a Mageia specific patch that introduces Time::ZoneInfo->current_zone()' +BEGIN { + if (-e '/etc/mageia-release') { + plan 'no_plan'; + } else { + plan skip_all => "Needs a Mageia specific patch that introduces Time::ZoneInfo->current_zone()"; + } +} BEGIN { use_ok 'urpm::cfg' } -- cgit v1.2.1