summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-26 01:35:45 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-26 17:18:11 -0400
commit23faa9361d79d1d88754a1e1e5aa9f040b34545c (patch)
tree2a0dcd569de702c6f697c5e5536c5ddd07c8146e /test
parent99933725329dc760f5cc704b3fd20f033dafdd14 (diff)
Merge pkgbuild-check-{nonfree,licenses}, add a summarize tool for it.
This should fix a number of bugs in those two scripts, and the summarize script simplifies aur and libremakepkg:hooks-check.sh
Diffstat (limited to 'test')
-rw-r--r--test/pkgbuild-check-licenses-test.sh27
-rw-r--r--test/pkgbuild-check-nonfree-test.sh11
2 files changed, 9 insertions, 29 deletions
diff --git a/test/pkgbuild-check-licenses-test.sh b/test/pkgbuild-check-licenses-test.sh
deleted file mode 100644
index efb4875..0000000
--- a/test/pkgbuild-check-licenses-test.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/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:.* ]]
- empty $tmpdir/stderr
- [[ $stat == 0 ]]
-}
diff --git a/test/pkgbuild-check-nonfree-test.sh b/test/pkgbuild-check-nonfree-test.sh
index 80bfc47..b30204b 100644
--- a/test/pkgbuild-check-nonfree-test.sh
+++ b/test/pkgbuild-check-nonfree-test.sh
@@ -2,6 +2,7 @@
# avoid carpel tunnel
pcn=pkgbuild-check-nonfree
+psn=pkgbuild-summarize-nonfree
describe $pcn
@@ -50,12 +51,18 @@ it_succeeds_for_nonfree_depend_with_replacement() {
[[ $stat == 0 ]]
}
-it_fails_with_15_for_nonfree_depend() {
+it_fails_for_nonfree_depend() {
$pcn $pcn.d/PKGBUILD.nonfree >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
+ [[ $stat != 0 ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
+
+ local pcn_stat=$stat
+ $psn $pcn_stat >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
+ [[ $stat != 0 ]]
empty $tmpdir/stdout
! empty $tmpdir/stderr
- [[ $stat == 15 ]]
}
it_fails_when_there_is_no_blacklist() {