diff options
author | Aki <please@ignore.pl> | 2024-01-06 02:42:16 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-01-06 02:44:00 +0100 |
commit | 080d76ce2cbe6883941b01fb46b5dbee3b0d72c9 (patch) | |
tree | 38307579a10814abc4b8a87f489397f3c3631d55 /test.sh | |
parent | 0a31e19167dc89a0d651a5aeab4ccbabde5d7369 (diff) | |
download | pkgrel-080d76ce2cbe6883941b01fb46b5dbee3b0d72c9.zip pkgrel-080d76ce2cbe6883941b01fb46b5dbee3b0d72c9.tar.gz pkgrel-080d76ce2cbe6883941b01fb46b5dbee3b0d72c9.tar.bz2 |
Added prefix and -d option
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -93,6 +93,25 @@ test_nested() { } +test_prefix() { + local pkgrel="$1" + local repo="$2" + cd "$repo" + git init + cat >PKGBUILD <<-PKGBUILD_initial + pkgname=test + pkgver=1.0.0 + pkgdesc="Package intended for testing" + PKGBUILD_initial + git add PKGBUILD + git commit -m "Initial commit" + test "$($pkgrel)" = "1" || exit 1 + test "$($pkgrel pkgrel=)" = "pkgrel=1" || exit 1 + test "$($pkgrel -d)" = "pkgrel=1" || exit 1 + test "$($pkgrel a= b= c=)" = "a=1" || exit 1 +} + + ok() { echo -e "${1:-unknown}... \033[32;1mok\033[0m" } @@ -113,3 +132,4 @@ execute_test() { execute_test test_increments execute_test test_root execute_test test_nested +execute_test test_prefix |