summaryrefslogtreecommitdiff
path: root/test/librefetch-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/librefetch-test.sh')
-rw-r--r--test/librefetch-test.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/librefetch-test.sh b/test/librefetch-test.sh
index b4be051..f9041db 100644
--- a/test/librefetch-test.sh
+++ b/test/librefetch-test.sh
@@ -48,6 +48,20 @@ it_displays_help() {
empty $tmpdir/stderr
}
+it_fails_with_bad_flags() {
+ local srcball=testpkg-1.0.tar.gz
+ cp librefetch.d/* "$tmpdir/"
+ cd "$tmpdir"
+ mv PKGBUILD{-mksource,}
+
+ librefetch --bogus-flag libre://"$srcball" >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
+
+ [[ $stat != 0 ]]
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+ not test -e $tmpdir/srcdest/$srcball
+}
+
# This test used to be called "it_cleans_src_libre_first", but let's
# be honest: it checks pretty much everything related to normal
# operation.