summaryrefslogtreecommitdiff
path: root/test/pkgbuild-check-licenses-test.sh
blob: 220ef6bf5b7174185c01a413d9e1d1ae04d78f1a (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
#!/usr/bin/env roundup

# avoid carpel tunnel
pcl=pkgbuild-check-licenses

describe $pcl

. ./test-common.sh

before() {
	_before
}

after() {
	_after
}

it_displays_usage_text() {
	# This test seems silly, but it makes sure that it is executable,
	# syntactically correct,  and loading libraries works.
	LANG=C $pcl -h >$tmpdir/stdout 2>$tmpdir/stderr
	stat=$?

	[[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]]
	[[ -z "$(cat $tmpdir/stderr)" ]]
	[[ $stat == 0 ]]
}