summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-05-27 22:54:50 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-05-27 22:54:50 -0600
commit25bd327ad06d0497e9888ebc7c4bbbd6cab11f12 (patch)
treeaa5da759fee295680d6cd208b1f51261e5ae75f2 /test
parent47fb685c2d6df5995134e9b8d322f667058e505e (diff)
fix a bug in conf.sh (from the get_files->list_files switch), add unit testtesting-20130528
Diffstat (limited to 'test')
-rw-r--r--test/lib-conf-test.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/lib-conf-test.sh b/test/lib-conf-test.sh
new file mode 100644
index 0000000..bb6b285
--- /dev/null
+++ b/test/lib-conf-test.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env roundup
+
+describe lib/conf.sh
+
+before() {
+ tmpdir=$(mktemp -d --tmpdir test-conf.sh.XXXXXXXXXXXX)
+ stat=0
+}
+
+after() {
+ rm -rf -- "$tmpdir" "$XDG_CACHE_HOME" "$XDG_CONFIG_HOME"
+}
+
+
+it_sets_makepkg_vars_in_custom_file() {
+ unset PKGDEST
+ touch "$tmpdir/makepkg.conf"
+ . $(librelib conf.sh)
+ MAKEPKG_CONF="$tmpdir/makepkg.conf" set_conf_makepkg PKGDEST /pkgdest
+ . "$tmpdir/makepkg.conf"
+ [[ $PKGDEST == /pkgdest ]]
+}