From 18cff8df56857d1ee935b4dce560b497adc722ba Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 11 Sep 2013 01:33:12 -0400 Subject: test: libremakepkg-test.sh: add a unit test for issue #380 --- test/libremakepkg-test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3-54-g00ecf