diff options
Diffstat (limited to 'test/aur-test.sh')
-rw-r--r-- | test/aur-test.sh | 30 |
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..1fbe659 --- /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() { + LANG=C aur -h >$tmpdir/stdout 2>$tmpdir/stderr + + [[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]] + [[ -z "$(cat $tmpdir/stderr)" ]] +} + +it_fails_with_0_args() { + aur >$tmpdir/stdout 2>$tmpdir/stderr || stat=$? + + [[ $stat != 0 ]] + [[ -z "$(cat $tmpdir/stdout)" ]] + [[ -n "$(cat $tmpdir/stderr)" ]] +} + +# TODO: Actually test |