summaryrefslogtreecommitdiff
path: root/test/aur-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/aur-test.sh')
-rw-r--r--test/aur-test.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/aur-test.sh b/test/aur-test.sh
new file mode 100644
index 0000000..5de590b
--- /dev/null
+++ b/test/aur-test.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env roundup
+
+describe aur
+
+. ./test-common.sh
+
+before() {
+ _before
+}
+
+after() {
+ _after
+}
+
+it_displays_help() {
+ LC_ALL=C aur -h >$tmpdir/stdout 2>$tmpdir/stderr
+
+ [[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]]
+ empty $tmpdir/stderr
+}
+
+it_fails_with_0_args() {
+ aur >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
+
+ [[ $stat != 0 ]]
+ empty $tmpdir/stdout
+ not empty $tmpdir/stderr
+}
+
+# TODO: Actually test