From 5d688d633267d560c343168380db835044dfb920 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 24 Jun 2026 16:41:11 +0200 Subject: Add version_of .info reader + test Co-Authored-By: Claude Opus 4.8 --- test-logic.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test-logic.sh') diff --git a/test-logic.sh b/test-logic.sh index 4505ecb..797041f 100755 --- a/test-logic.sh +++ b/test-logic.sh @@ -138,6 +138,11 @@ count=$(find "$PKG_CACHE/net/libfoo" -name '*.t?z' | wc -l) [[ -e "$PKG_CACHE/net/libfoo/libfoo-1.2-x86_64-1_danix.txz" ]] && ok "cache_store stored new file" || bad "cache_store did not store new file" rm -rf "$srctmp" +# version_of reads VERSION from .info +mkdir -p "$T/cat/verpkg" +printf 'PRGNAM="verpkg"\nVERSION="3.4.5"\nREQUIRES=""\n' > "$T/cat/verpkg/verpkg.info" +[[ "$(version_of "$T/cat/verpkg")" == "3.4.5" ]] && ok "version_of reads VERSION" || bad "version_of wrong, got [$(version_of "$T/cat/verpkg")]" + # --- result ----------------------------------------------------------------- echo echo "$pass passed, $fail failed" -- cgit v1.2.3