diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-24 14:23:50 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-24 14:23:50 +0200 |
commit | fbfb0a92b7411d0a40cebacfcca97aa8c5fd2d22 (patch) | |
tree | 138161440d71d42eb6b420e6ee98ebc2ffd33a35 /t/13-local-check.t | |
parent | 33958975ad258f50f6abea7983274b43db63b09d (diff) | |
download | sbotools2-fbfb0a92b7411d0a40cebacfcca97aa8c5fd2d22.tar.xz |
13-local-check.t: make sure only specific results are returned
Diffstat (limited to 't/13-local-check.t')
-rwxr-xr-x | t/13-local-check.t | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/13-local-check.t b/t/13-local-check.t index 1531af9..0e8e315 100755 --- a/t/13-local-check.t +++ b/t/13-local-check.t @@ -18,9 +18,12 @@ if ($ENV{TEST_INSTALL} and $ENV{TRAVIS}) { sub cleanup { capture_merged { system(qw!/sbin/removepkg nonexistentslackbuild!); + system(qw!/sbin/removepkg nonexistentslackbuild5!); unlink "$RealBin/LO/nonexistentslackbuild/perf.dummy"; system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.0!); + system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.0!); system(qw!rm -rf /tmp/package-nonexistentslackbuild!); + system(qw!rm -rf /tmp/package-nonexistentslackbuild5!); system(qw!rm -rf!, "$RealBin/gitrepo"); }; } @@ -30,8 +33,9 @@ sub setup_gitrepo { cd "$RealBin"; rm -rf gitrepo; mkdir gitrepo; cd gitrepo; git init; - mkdir -p "test/nonexistentslackbuild"; + mkdir -p "test/nonexistentslackbuild" "test/nonexistentslackbuild5"; cp "$RealBin/LO2/nonexistentslackbuild/nonexistentslackbuild.info" "test/nonexistentslackbuild" + cp "$RealBin/LO/nonexistentslackbuild5/nonexistentslackbuild5.info" "test/nonexistentslackbuild5" git add "test"; git commit -m 'initial'; END } @@ -51,7 +55,8 @@ sbocheck { expected => sub { $_[0] !~ /nonexistentslackbuild/}, note => 1 }; # 4: sbocheck should list nonexistentslackbuild as being newer on SBo after we've installed it sboinstall 'nonexistentslackbuild', { input => "y\ny", test => 0 }; -sbocheck { expected => qr/nonexistentslackbuild/ }; +sboinstall 'nonexistentslackbuild5', { input => "y\ny", test => 0 }; +sbocheck { expected => sub { /nonexistentslackbuild/ and not /nonexistentslackbuild5/ } }; # Cleanup END { |