summaryrefslogtreecommitdiff
path: root/test/aur-test.sh
blob: 5de590b32fd46bcca8de42e3af736b579598c711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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