tests: add tests for abuild-gzsplit

ref #9999
This commit is contained in:
Natanael Copa 2020-07-08 10:55:01 +02:00
parent 2be7002cda
commit 84e82828ba
3 changed files with 27 additions and 0 deletions

27
tests/abuild-gzsplit.bats Normal file
View File

@ -0,0 +1,27 @@
setup() {
startdir=$PWD
export ABUILD_GZSPLIT="$PWD/.."/abuild-gzsplit
outdir="$PWD/tmp"
mkdir -p $outdir
datadir="$PWD/testdata"
cd "$outdir"
}
teardown() {
rm -f "$outdir"/control.tar.gz \
"$outdir"/data.tar.gz \
"$outdir"/signatures.tar.gz
rmdir "$outdir"
cd "$startdir"
}
@test "abuild-gzsplit with 3.11 package" {
run $ABUILD_GZSPLIT < "$datadir"/alpine-base-3.11.6-r0.apk
[ "$status" -eq 0 ]
}
@test "abuild-gzsplit with 3.12 package" {
run $ABUILD_GZSPLIT < "$datadir"/alpine-base-3.12.0-r0.apk
[ "$status" -eq 0 ]
}

BIN
tests/testdata/alpine-base-3.11.6-r0.apk vendored Normal file

Binary file not shown.

BIN
tests/testdata/alpine-base-3.12.0-r0.apk vendored Normal file

Binary file not shown.