summaryrefslogtreecommitdiff
path: root/test/pkgbuild-check-licenses-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/pkgbuild-check-licenses-test.sh')
-rw-r--r--test/pkgbuild-check-licenses-test.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/pkgbuild-check-licenses-test.sh b/test/pkgbuild-check-licenses-test.sh
new file mode 100644
index 0000000..220ef6b
--- /dev/null
+++ b/test/pkgbuild-check-licenses-test.sh
@@ -0,0 +1,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 ]]
+}