diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-06 15:59:51 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-11 15:43:37 -0400 |
commit | 61882e4d79a02cb5d32a9b558ee3a0c15f62d01a (patch) | |
tree | 3549a6da794e4e632e2c3e54c5adcf489f5242e9 /test/pkgbuild-check-licenses-test.sh | |
parent | 4f556e1b9896b77e7b0f74afddad5fd8c1892641 (diff) |
test: Add pkgbuild-check-licenses-test.sh with a basic usage text test.
Diffstat (limited to 'test/pkgbuild-check-licenses-test.sh')
-rw-r--r-- | test/pkgbuild-check-licenses-test.sh | 27 |
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 ]] +} |