sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit c1cec8b019116c317eca07cba562083d63e12954
parent d3ae316677abeebc5de55f5d2858e517b78d4dea
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Fri,  1 Apr 2016 22:37:03 +0200

Check for error condition in test

Diffstat:
Mt/03-online.t | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git 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