summaryrefslogtreecommitdiff
path: root/test/libremakepkg-test.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 01:33:12 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:23:29 -0400
commit18cff8df56857d1ee935b4dce560b497adc722ba (patch)
tree8332ccb18d51a7ba29b5431da04cf989d07941fa /test/libremakepkg-test.sh
parent589186164cfbb1e033b9dfad33c9bf82b9404b1c (diff)
test: libremakepkg-test.sh: add a unit test for issue #380
Diffstat (limited to 'test/libremakepkg-test.sh')
-rw-r--r--test/libremakepkg-test.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh
index 95080af..011674a 100644
--- a/test/libremakepkg-test.sh
+++ b/test/libremakepkg-test.sh
@@ -28,6 +28,17 @@ it_builds_a_trivial_package() {
[[ -f $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]]
}
+it_handles_PKGDEST_not_existing() {
+ require network sudo || return 0
+ cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD"
+ cd "$tmpdir"
+
+ libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
+ testsudo env PKGDEST="$tmpdir/dest/pkgdest" libremakepkg
+
+ [[ -f $(echo dest/pkgdest/libretools-hello-1.0-1-any.pkg.tar.?z) ]]
+}
+
it_displays_help_as_normal_user() {
rm -rf "$XDG_CONFIG_HOME"
libremakepkg -h >$tmpdir/stdout 2>$tmpdir/stderr