summaryrefslogtreecommitdiff
path: root/test/lib-conf-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib-conf-test.sh')
-rw-r--r--test/lib-conf-test.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/lib-conf-test.sh b/test/lib-conf-test.sh
index 0ee0f62..86c11c6 100644
--- a/test/lib-conf-test.sh
+++ b/test/lib-conf-test.sh
@@ -2,16 +2,16 @@
describe lib/conf.sh
+. ./test-common.sh
+
before() {
- tmpdir=$(mktemp -d --tmpdir test-conf.sh.XXXXXXXXXXXX)
- stat=0
+ _before test-conf.sh
}
after() {
- rm -rf -- "$tmpdir" "$XDG_CACHE_HOME" "$XDG_CONFIG_HOME"
+ _after
}
-
it_sets_makepkg_vars_in_custom_file() {
unset PKGDEST
touch "$tmpdir/makepkg.conf"
@@ -22,6 +22,7 @@ it_sets_makepkg_vars_in_custom_file() {
}
it_figures_out_HOME_when_root() {
+ require sudo || return 0
cd "$tmpdir"
echo '. $(librelib conf.sh); echo "$LIBREHOME"' > test.sh