summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-01 19:20:44 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-01 19:20:44 -0500
commit3ed991a0ab8adbc30e66771080d565668d8dd3a6 (patch)
tree2ead922a0d2bd080467881ae10027474ee5722a3 /test
parent6c23f9d00ac733779d9181fdfc0a789293ddb110 (diff)
librefetch test: can no longer count on the DLAGENT being eval()ed
Diffstat (limited to 'test')
-rw-r--r--test/librefetch-test.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/librefetch-test.sh b/test/librefetch-test.sh
index 9db836b..806eeaf 100644
--- a/test/librefetch-test.sh
+++ b/test/librefetch-test.sh
@@ -7,13 +7,14 @@ describe librefetch
before() {
_before
- mkdir -p "$HOME"
+ mkdir -p "$XDG_CONFIG_HOME"/{pacman,libretools}
+
printf '%s\n' \
- "DLAGENTS=({https,libre}'::$(which librefetch) -p \"\$BUILDFILE\" -- %u %o')" \
+ 'DLAGENTS=({https,libre}"::$(which librefetch) -p $(printf %q "${BUILDFILE:-$BUILDSCRIPT}") -- %u %o")' \
'BUILDDIR=""' \
- > "$HOME/.makepkg.conf"
+ 'unset SRCDEST' \
+ > "$XDG_CONFIG_HOME/pacman/makepkg.conf"
- mkdir -p "$XDG_CONFIG_HOME/libretools"
printf '%s\n' \
'MIRRORS=("phony://example.com/dir/")' \
'DOWNLOADER=/usr/bin/false' \
@@ -43,7 +44,7 @@ it_cleans_src_libre_first() {
# run librefetch
makepkg -g
- srcball=src/testpkg-1.0.tar.gz
+ srcball=testpkg-1.0.tar.gz
bsdtar tf "$srcball" > list-pkg.txt
diff -u list.txt list-pkg.txt
}