tests: add test for correctly handling CVC when archiving

This commit is contained in:
Marcus Hoffmann 2019-12-23 20:07:56 +01:00
parent e9830fc4ab
commit 7f6efa74f5
2 changed files with 15 additions and 0 deletions

Binary file not shown.

View File

@ -387,6 +387,21 @@ if ! which apksigner; then
test -e archive/com.politedroid_5.apk
! test -e archive/com.politedroid_6.apk
test -e repo/com.politedroid_6.apk
echo "set an earlier version as CVC and test that it's the only one not archived"
$sed -i.tmp 's,^Current Version Code:6,Current Version Code:5,' metadata/com.politedroid.txt
$fdroid update --pretty --nosign
test `grep '<package>' archive/index.xml | wc -l` -eq 3
test `grep '<package>' repo/index.xml | wc -l` -eq 1
grep -F com.politedroid_3.apk archive/index.xml
grep -F com.politedroid_4.apk archive/index.xml
grep -F com.politedroid_5.apk repo/index.xml
grep -F com.politedroid_6.apk archive/index.xml
test -e archive/com.politedroid_3.apk
test -e archive/com.politedroid_4.apk
test -e repo/com.politedroid_5.apk
! test -e repo/com.politedroid_6.apk
test -e archive/com.politedroid_6.apk
fi