From 6f56c43839fe64fb500bfe9415c0dcaa54704117 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20A=2E=20Holm?= Date: Sat, 29 May 2021 20:05:21 +0200 Subject: [PATCH] ga-fsck-size.t, ga-sumsize.t: Skip tests if Number::Bytes::Human is missing a7e0bb60-c0a8-11eb-9b75-45c42403b986 --- tests/ga-fsck-size.t | 8 +++++++- tests/ga-sumsize.t | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/ga-fsck-size.t b/tests/ga-fsck-size.t index ffe82dd0..0ee8c3b2 100755 --- a/tests/ga-fsck-size.t +++ b/tests/ga-fsck-size.t @@ -16,7 +16,13 @@ use strict; use warnings; BEGIN { - use Test::More qw{no_plan}; + use Test::More; + if (eval { require Number::Bytes::Human; }) { + plan "no_plan"; + } else { + plan "skip_all" => "Number::Bytes::Human is not installed," + . " skipping tests"; + } # use_ok() goes here } diff --git a/tests/ga-sumsize.t b/tests/ga-sumsize.t index f37e3a27..6fa9e9d5 100755 --- a/tests/ga-sumsize.t +++ b/tests/ga-sumsize.t @@ -16,7 +16,13 @@ use strict; use warnings; BEGIN { - use Test::More qw{no_plan}; + use Test::More; + if (eval { require Number::Bytes::Human; }) { + plan "no_plan"; + } else { + plan "skip_all" => "Number::Bytes::Human is not installed," + . " skipping tests"; + } # use_ok() goes here } -- 2.11.4.GIT