tests: add test with invalid version of subpkgs' dependency

Ref: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10058
This commit is contained in:
Natanael Copa 2022-01-17 16:17:25 +01:00
parent 9a96275d87
commit 681ef9dfcf
2 changed files with 6 additions and 0 deletions

View File

@ -236,3 +236,8 @@ teardown() {
&& ! TESTSUBNAME="-foo" $ABUILD sanitycheck
}
@test "abuild: invalid subpkg's version" {
cd testrepo/test-pkgname
! TESTDEPVER="1.0-0" $ABUILD all
}

View File

@ -28,5 +28,6 @@ package() {
}
_sub() {
depends="$pkgname=${TESTDEPVER-$pkgver-r$pkgrel}"
mkdir -p "$subpkgdir"
}