From 61882e4d79a02cb5d32a9b558ee3a0c15f62d01a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 6 Sep 2013 15:59:51 -0400 Subject: test: Add pkgbuild-check-licenses-test.sh with a basic usage text test. --- test/pkgbuild-check-licenses-test.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/pkgbuild-check-licenses-test.sh (limited to 'test') 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 ]] +} -- cgit v1.2.2