diff mbox

[dbscripts] test: fix misuse of $PKGEXT

Message ID 20180216034926.28424-1-eschwartz@archlinux.org
State Rejected
Headers show

Commit Message

Emil Velikov via arch-projects Feb. 16, 2018, 3:49 a.m. UTC
As per the previous commits, this never worked and nobody noticed
because the use of globbing was undocumented.

Fortunately, we can fix that now, by using the new is_globfile() proxy
function.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---
 test/cases/ftpdir-cleanup.bats | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/test/cases/ftpdir-cleanup.bats b/test/cases/ftpdir-cleanup.bats
index 6280ce0..63eed03 100644
--- a/test/cases/ftpdir-cleanup.bats
+++ b/test/cases/ftpdir-cleanup.bats
@@ -13,8 +13,8 @@  __checkRepoRemovedPackage() {
 	local pkgname
 
 	for pkgname in $(__getPackageNamesFromPackageBase ${pkgbase}); do
-		[[ ! -f ${FTP_BASE}/${PKGPOOL}/${pkgname}-*${PKGEXT} ]]
-		[[ ! -f ${FTP_BASE}/${repo}/os/${repoarch}/${pkgname}-*${PKGEXT} ]]
+		! is_globfile "${FTP_BASE}/${PKGPOOL}/${pkgname}"-*${PKGEXT}
+		! is_globfile "${FTP_BASE}/${repo}/os/${repoarch}/${pkgname}"-*${PKGEXT}
 	done
 }