git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 4/8] t5003: skip conversion test if unzip -a is unavailable

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Mar 25, 2020, 15:06 UTC
Message-ID
<e5b09c290c1ff0fb0d7171927194e598e46daae2.1585148327.git.congdanhqx@gmail.com>
In-Reply-To
<cover.1585148327.git.congdanhqx@gmail.com>
Alpine Linux's default unzip(1) doesn't support `-a`.
Skip those tests on that platform.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 t/t5003-archive-zip.sh | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh
index df1374a312..3b76d2eb65 100755
--- a/t/t5003-archive-zip.sh
+++ b/t/t5003-archive-zip.sh
@@ -11,6 +11,10 @@ test_lazy_prereq UNZIP_SYMLINKS '
 	test -h symlink
 '
 
+test_lazy_prereq UNZIP_CONVERT '
+	"$GIT_UNZIP" -a "$TEST_DIRECTORY"/t5003/infozip-symlinks.zip
+'
+
 check_zip() {
 	zipfile=$1.zip
 	listfile=$1.lst
@@ -35,33 +39,33 @@ check_zip() {
 	extracted=${dir_with_prefix}a
 	original=a
 
-	test_expect_success UNZIP " extract ZIP archive with EOL conversion" '
+	test_expect_success UNZIP_CONVERT " extract ZIP archive with EOL conversion" '
 		(mkdir $dir && cd $dir && "$GIT_UNZIP" -a ../$zipfile)
 	'
 
-	test_expect_success UNZIP " validate that text files are converted" "
+	test_expect_success UNZIP_CONVERT " validate that text files are converted" "
 		test_cmp_bin $extracted/text.cr $extracted/text.crlf &&
 		test_cmp_bin $extracted/text.cr $extracted/text.lf
 	"
 
-	test_expect_success UNZIP " validate that binary files are unchanged" "
+	test_expect_success UNZIP_CONVERT " validate that binary files are unchanged" "
 		test_cmp_bin $original/binary.cr   $extracted/binary.cr &&
 		test_cmp_bin $original/binary.crlf $extracted/binary.crlf &&
 		test_cmp_bin $original/binary.lf   $extracted/binary.lf
 	"
 
-	test_expect_success UNZIP " validate that diff files are converted" "
+	test_expect_success UNZIP_CONVERT " validate that diff files are converted" "
 		test_cmp_bin $extracted/diff.cr $extracted/diff.crlf &&
 		test_cmp_bin $extracted/diff.cr $extracted/diff.lf
 	"
 
-	test_expect_success UNZIP " validate that -diff files are unchanged" "
+	test_expect_success UNZIP_CONVERT " validate that -diff files are unchanged" "
 		test_cmp_bin $original/nodiff.cr   $extracted/nodiff.cr &&
 		test_cmp_bin $original/nodiff.crlf $extracted/nodiff.crlf &&
 		test_cmp_bin $original/nodiff.lf   $extracted/nodiff.lf
 	"
 
-	test_expect_success UNZIP " validate that custom diff is unchanged " "
+	test_expect_success UNZIP_CONVERT " validate that custom diff is unchanged " "
 		test_cmp_bin $original/custom.cr   $extracted/custom.cr &&
 		test_cmp_bin $original/custom.crlf $extracted/custom.crlf &&
 		test_cmp_bin $original/custom.lf   $extracted/custom.lf
-- 
2.26.0.rc2.357.g1e1ba0441d
Previous: Đoàn Trần Công DanhNext: Đoàn Trần Công Danh
Message 5 of 9 in “fix test failure with busybox”
  1. 0/8 fix test failure with busyboxĐoàn Trần Công Danh, Mar 25, 2020
  2. 1/8 t4061: use POSIX compliant regex(7)Đoàn Trần Công Danh, Mar 25, 2020
  3. 2/8 test-lib-functions: test_cmp: eval $GIT_TEST_CMPĐoàn Trần Công Danh, Mar 25, 2020
  4. 3/8 t5003: drop the subshell in test_lazy_prereqĐoàn Trần Công Danh, Mar 25, 2020
  5. 4/8 t5003: skip conversion test if unzip -a is unavailableĐoàn Trần Công Danh, Mar 25, 2020
  6. 5/8 t5616: use rev-parse instead to get HEAD's object_idĐoàn Trần Công Danh, Mar 25, 2020
  7. 7/8 t4124: fix test for non-compliant diff(1)Đoàn Trần Công Danh, Mar 25, 2020
  8. 6/8 t7063: drop non-POSIX argument "-ls" from find(1)Đoàn Trần Công Danh, Mar 25, 2020
  9. 8/8 t5703: feed raw data into test-tool unpack-sidebandĐoàn Trần Công Danh, Mar 25, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.