diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/framework | 10 | ||||
-rwxr-xr-x | test/integration/test-same-version-but-different | 11 |
2 files changed, 18 insertions, 3 deletions
diff --git a/test/integration/framework b/test/integration/framework index 264c228d0..3bf8a3fec 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1022,9 +1022,13 @@ insertpackage() { Priority: $PRIORITY Section: $SECTION Installed-Size: 42 -Size: 42 -SHA256: 0000000000000000000000000000000000000000000000000000000000000000 -Maintainer: Joe Sixpack <joe@example.org>" +Size: 42" + if echo "$DEPENDENCIES" | grep -q SHA256:; then + : + else + echo "SHA256: 0000000000000000000000000000000000000000000000000000000000000000" + fi + echo "Maintainer: Joe Sixpack <joe@example.org>" test "$arch" = 'none' || echo "Architecture: $arch" echo "Version: $VERSION Filename: pool/${DISTSECTION}/${NAME}/${NAME}_${VERSION}_${arch}.deb" diff --git a/test/integration/test-same-version-but-different b/test/integration/test-same-version-but-different index df6753a43..595a66fb6 100755 --- a/test/integration/test-same-version-but-different +++ b/test/integration/test-same-version-but-different @@ -30,6 +30,9 @@ insertpackage 'testing' 'diff-size' 'all' '1' 'Size: 42' insertpackage 'unstable' 'diff-instsize' 'all' '1' 'Installed-Size: 21' insertpackage 'testing' 'diff-instsize' 'all' '1' 'Installed-Size: 42' +insertpackage 'unstable' 'diff-sha256' 'all' '1' 'SHA256: 0000000000000000000000000000000000000000000000000000000000000000' +insertpackage 'testing' 'diff-sha256' 'all' '1' 'SHA256: 0000000000000000000000000000000000000000000000000000000000000001' + setupaptarchive APTARCHIVE="$(readlink -f ./aptarchive)" @@ -96,3 +99,11 @@ testsuccessequal "diff-instsize: 500 file:${APTARCHIVE} testing/main all Packages 1 500 500 file:${APTARCHIVE} unstable/main all Packages" apt policy diff-instsize +testsuccessequal "diff-sha256: + Installed: (none) + Candidate: 1 + Version table: + 1 500 + 500 file:${APTARCHIVE} testing/main all Packages + 1 500 + 500 file:${APTARCHIVE} unstable/main all Packages" apt policy diff-sha256 |