diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-02 15:38:48 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-02 15:38:48 +0200 |
commit | 8fc7b067e8585a43c0b47d8580232d00072016ef (patch) | |
tree | 3f8560cfe1bc99c3b31aaa7947ab5134cbd6ba96 /t/06-remove.t | |
parent | a669651233bf2dd55b969756dff65b7f7fbfdf8f (diff) | |
download | sbotools2-8fc7b067e8585a43c0b47d8580232d00072016ef.tar.xz |
06-remove.t: Add test for displaying readme if %README% req
Diffstat (limited to 't/06-remove.t')
-rwxr-xr-x | t/06-remove.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/06-remove.t b/t/06-remove.t index a168074..40b15d8 100755 --- a/t/06-remove.t +++ b/t/06-remove.t @@ -10,7 +10,7 @@ use lib $RealBin; use Test::Sbotools qw/ make_slackbuilds_txt set_lo sboinstall sboremove /; if ($ENV{TEST_INSTALL}) { - plan tests => 11; + plan tests => 12; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -22,18 +22,22 @@ sub cleanup { system(qw!/sbin/removepkg nonexistentslackbuild4!); system(qw!/sbin/removepkg nonexistentslackbuild5!); system(qw!/sbin/removepkg nonexistentslackbuild7!); + system(qw!/sbin/removepkg nonexistentslackbuild8!); unlink "$RealBin/LO/nonexistentslackbuild/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild4/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild5/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild7/perf.dummy"; + unlink "$RealBin/LO/nonexistentslackbuild8/perf.dummy"; system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild4-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild7-1.0!); + system(qw!rm -rf /tmp/SBo/nonexistentslackbuild8-1.0!); system(qw!rm -rf /tmp/package-nonexistentslackbuild!); system(qw!rm -rf /tmp/package-nonexistentslackbuild4!); system(qw!rm -rf /tmp/package-nonexistentslackbuild5!); system(qw!rm -rf /tmp/package-nonexistentslackbuild7!); + system(qw!rm -rf /tmp/package-nonexistentslackbuild8!); }; } @@ -79,6 +83,10 @@ TODO: { sboremove qw/ -a nonexistentslackbuild4 /, { input => "y\nn\ny", expected => qr/nonexistentslackbuild5 : required by nonexistentslackbuild7/ }; sboremove 'nonexistentslackbuild7', { input => "y\ny\ny", expected => qr/nonexistentslackbuild5/ }; +# 12: sboremove shows readme for %README% dep +sboinstall 'nonexistentslackbuild8', { input => "y\ny", test => 0 }; +sboremove 'nonexistentslackbuild8', { input => "y\ny\ny", expected => qr/But has to be read/ }; + # Cleanup END { cleanup(); |