diff options
| author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2017-02-05 13:38:25 +0100 | 
|---|---|---|
| committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2017-02-05 13:38:25 +0100 | 
| commit | 9d63b253be04113a55c7f6efe070887127927812 (patch) | |
| tree | 7ce2c3e7409a524883f57e02b7c62c98df7bcd99 /t | |
| parent | 7d98bba95d59e3620f4cc9925d37cc57d435da9a (diff) | |
| download | sbotools2-9d63b253be04113a55c7f6efe070887127927812.tar.xz | |
t/ fix up some tests for new sboremove
Diffstat (limited to 't')
| -rwxr-xr-x | t/28-race-sboremove.t | 2 | ||||
| -rwxr-xr-x | t/29-unit-sboremove.t | 35 | 
2 files changed, 1 insertions, 36 deletions
| diff --git a/t/28-race-sboremove.t b/t/28-race-sboremove.t index ebc707f..b4f0910 100755 --- a/t/28-race-sboremove.t +++ b/t/28-race-sboremove.t @@ -52,4 +52,4 @@ tie *STDIN, 'STDINTIE';  my $res = load('sboremove', argv => ['nonexistentslackbuild8']);  like ($res->{out}, qr/Unable to open README for nonexistentslackbuild8\./, 'sboremove output with race condition correct'); -is ($res->{exit}, 0, 'sboremove exited with 0'); +is ($res->{exit}, undef, 'sboremove did not exit in error'); diff --git a/t/29-unit-sboremove.t b/t/29-unit-sboremove.t deleted file mode 100755 index a968dc7..0000000 --- a/t/29-unit-sboremove.t +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use Test::More; -use Test::Exit; -use FindBin '$RealBin'; -use lib $RealBin; -use Test::Sbotools qw/ load /; -use Capture::Tiny qw/ capture_merged /; -use File::Temp 'tempdir'; -use Cwd; - -plan tests => 1; - -# 1: sboremove unit test... -{ -	load('sboremove'); - -  no warnings 'redefine', 'once'; - -  my $sentinel = 0; -  local *main::in = sub { -    my $find = shift; -    my @ret = grep { $find eq $_ } @_; -    $sentinel++ if @ret; -    return 1 if @ret; -    return 0; -  }; - -  main::confirm_remove('foo'); -  main::confirm_remove('foo'); - -  is ($sentinel, 1, "confirm_remove() checks for duplicates."); -} | 
