diff options
Diffstat (limited to 'test/cases/librefetch.bats')
-rw-r--r-- | test/cases/librefetch.bats | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/test/cases/librefetch.bats b/test/cases/librefetch.bats index 8f03494..21150bb 100644 --- a/test/cases/librefetch.bats +++ b/test/cases/librefetch.bats @@ -12,7 +12,6 @@ setup() { BUILDDIR="" source ${_librelib_conf_sh_sysconfdir@Q}/makepkg.d/librefetch.conf eot - export MAKEPKG_CONF="$XDG_CONFIG_HOME/pacman/makepkg.conf" install -Dm644 /dev/stdin "$XDG_CONFIG_HOME/libretools/librefetch.conf" <<-eot MIRRORS=("phony://example.com/dir/") @@ -130,3 +129,31 @@ setup() { empty "$tmpdir/workdir/srcdest/$srcball" gpg --quiet --verify "$tmpdir/workdir/srcdest/$srcball"{.sig,} 2>/dev/null } + +@test "librefetch handles split packages" { + cp fixtures/librefetch/* "$tmpdir/" + cd "$tmpdir" + mv PKGBUILD{-split,} + + makepkg -g +} + +@test "librefetch uses the specified compression" { + cp fixtures/librefetch/* "$tmpdir/" + cd "$tmpdir" + local srcball + + # Both gzip and bzip2 are in 'base', so this choice of + # compression methods doesn't add anything to our list of + # dependencies. + + srcball=testpkg-1.0.tar.gz + mv PKGBUILD{-mksource,} + makepkg -g + gzip -d <"$tmpdir/workdir/srcdest/$srcball" >/dev/null + + srcball=testpkg-bz2-1.0.tar.bz2 + mv PKGBUILD{-bz2,} + makepkg -g + bzip2 -d <"$tmpdir/workdir/srcdest/$srcball" >/dev/null +} |