From 9a993b06fbef6a2b7b87fcca15be5e022da55322 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sat, 13 Oct 2018 09:17:00 -0300 Subject: [PATCH] Bug 18959: Skip xt/author/Text_CSV_Various.t if Text::CSV::Unicode missing --- xt/author/Text_CSV_Various.t | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/xt/author/Text_CSV_Various.t b/xt/author/Text_CSV_Various.t index f7f8ff966e..23b1f91db2 100755 --- a/xt/author/Text_CSV_Various.t +++ b/xt/author/Text_CSV_Various.t @@ -22,16 +22,24 @@ use Modern::Perl; -use Test::More tests => 32; +use Test::More; use Test::Warn; + +use Text::CSV; +use Text::CSV_XS; + +use Module::Load::Conditional qw/check_install/; + BEGIN { - use FindBin; - use lib $FindBin::Bin; - use_ok('Text::CSV'); - use_ok('Text::CSV_XS'); - use_ok('Text::CSV::Unicode'); + if ( check_install( module => 'Text::CSV::Unicode' ) ) { + plan tests => 29; + } else { + plan skip_all => "Need Text::CSV::Unicode" + } } +use Text::CSV::Unicode; + sub pretty_line { my $max = 54; (@_) or return "#" x $max . "\n"; -- 2.19.1