aboutsummaryrefslogtreecommitdiff
path: root/t/13-local-check.t
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-24 13:57:03 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-24 13:57:03 +0200
commit572ad45b5959edbc943f64da07cb077e90c69693 (patch)
tree0f8dc5fe4dd6c2ea525047d5d79a4ab23a15d900 /t/13-local-check.t
parentb751cc34813b994588c75ffebf16750a70693eda (diff)
downloadsbotools2-572ad45b5959edbc943f64da07cb077e90c69693.tar.xz
13-local-check.t: test for automatic sbosnap fetching
Diffstat (limited to 't/13-local-check.t')
-rwxr-xr-xt/13-local-check.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/13-local-check.t b/t/13-local-check.t
index dbc85b5..1531af9 100755
--- a/t/13-local-check.t
+++ b/t/13-local-check.t
@@ -10,7 +10,7 @@ use lib $RealBin;
use Test::Sbotools qw/ make_slackbuilds_txt set_lo set_repo sbosnap sbocheck sboinstall sbofind /;
if ($ENV{TEST_INSTALL} and $ENV{TRAVIS}) {
- plan tests => 2;
+ plan tests => 4;
} else {
plan skip_all => "Only run these tests if TEST_INSTALL=1 and we're running under Travis CI";
}
@@ -42,12 +42,14 @@ set_lo("$RealBin/LO");
setup_gitrepo();
set_repo("file://$RealBin/gitrepo/");
-sbosnap 'fetch', { test => 0 };
+# 1-2: sbofind without having a repo yet
+sbofind 'nonexistentslackbuild', { input => "n", expected => qr/It looks like you haven't run "sbosnap fetch" yet\.\nWould you like me to do this now\?.*Please run "sbosnap fetch"/ };
+sbofind 'nonexistentslackbuild', { input => "y", expected => qr/It looks like you haven't run "sbosnap fetch" yet\.\nWould you like me to do this now\?/ };
-# 1: sbocheck without having installed nonexistentslackbuild should not show it
+# 3: sbocheck without having installed nonexistentslackbuild should not show it
sbocheck { expected => sub { $_[0] !~ /nonexistentslackbuild/}, note => 1 };
-# 2: sbocheck should list nonexistentslackbuild as being newer on SBo after we've installed it
+# 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/ };