From a7be7f4f9fd935660b023de49264290ac7a5031a Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 17:02:56 -1000 Subject: Ask for gzip where the tag snapshot needs it The test ran gzip without the GZIP prerequisite t0110 uses for the same need, and it took a file-1 anywhere in the listing rather than under the tag's own prefix. --- tests/t0303-robustness.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 0a754d7..d9a8809 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -590,12 +590,15 @@ test_expect_success 'the diff caps hold when the path names a directory' ' ! grep "too large to be rendered inline" tmp ' -test_expect_success 'a snapshot of a tag spelled like an option is archived' ' +test_lazy_prereq GZIP 'command -v gzip' + +test_expect_success GZIP 'a snapshot of a tag spelled like an option is archived' ' git -C repos/rob update-ref refs/tags/-l HEAD && - cgit_rc robrc "url=rob/snapshot/-l.tar.gz" >tmp && - grep "^Status: 200" tmp && - strip_headers list && - grep "file-1" list + cgit_ok robrc "url=rob/snapshot/-l.tar.gz" >tmp && + strip_headers archive.tar.gz && + gzip -dc archive.tar.gz >archive.tar && + tar -tf archive.tar >list && + test_grep "^-l/file-1$" list ' test -n "$CGIT_VALGRIND" || test_set_prereq NO_VALGRIND -- cgit 2.12.1