From c1cec8b019116c317eca07cba562083d63e12954 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 1 Apr 2016 22:37:03 +0200 Subject: Check for error condition in test --- t/03-online.t | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 't') diff --git a/t/03-online.t b/t/03-online.t index c04366f..c9354ef 100755 --- a/t/03-online.t +++ b/t/03-online.t @@ -40,11 +40,14 @@ chk_slackbuilds_txt(); # 1-2: check_distfiles test { - my $symlinks; - stderr_like(sub { $symlinks = check_distfiles(LOCATION => "$repo_path/perl/perl-Sort-Versions"); }, + my ($symlinks, $exit); + stderr_like(sub { ($symlinks, $exit) = check_distfiles(LOCATION => "$repo_path/perl/perl-Sort-Versions"); }, qr/Resolving search[.]cpan[.]org/, 'check_distfiles output good'); - is($$symlinks[0], "$repo_path/perl/perl-Sort-Versions/Sort-Versions-1.5.tar.gz", - 'check_distfiles test 01'); + SKIP: { + skip 1, "check_distfiles errored out." if defined $exit; + is($symlinks->[0], "$repo_path/perl/perl-Sort-Versions/Sort-Versions-1.5.tar.gz", + 'check_distfiles test 01'); + } } # 3-4: get_distfile tests -- cgit v1.2.3