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

[PATCH v2 07/28] t1007: annotate with SHA1 prerequisite

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 13, 2018, 02:24 UTC
Message-ID
<20180513022438.60003-8-sandals@crustytoothpaste.net>
In-Reply-To
<20180513022438.60003-1-sandals@crustytoothpaste.net>

Since this is a core test that tests basic functionality, annotate the assertions that have dependencies on SHA-1 with the appropriate prerequisite.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 t/t1007-hash-object.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index 532682f51c..a37753047e 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -9,13 +9,13 @@ echo_without_newline() {
 }
 
 test_blob_does_not_exist() {
-	test_expect_success 'blob does not exist in database' "
+	test_expect_success SHA1 'blob does not exist in database' "
 		test_must_fail git cat-file blob $1
 	"
 }
 
 test_blob_exists() {
-	test_expect_success 'blob exists in database' "
+	test_expect_success SHA1 'blob exists in database' "
 		git cat-file blob $1
 	"
 }
@@ -73,19 +73,19 @@ test_expect_success "Can't use --path with --no-filters" '
 
 push_repo
 
-test_expect_success 'hash a file' '
+test_expect_success SHA1 'hash a file' '
 	test $hello_sha1 = $(git hash-object hello)
 '
 
 test_blob_does_not_exist $hello_sha1
 
-test_expect_success 'hash from stdin' '
+test_expect_success SHA1 'hash from stdin' '
 	test $example_sha1 = $(git hash-object --stdin < example)
 '
 
 test_blob_does_not_exist $example_sha1
 
-test_expect_success 'hash a file and write to database' '
+test_expect_success SHA1 'hash a file and write to database' '
 	test $hello_sha1 = $(git hash-object -w hello)
 '
 
@@ -161,7 +161,7 @@ pop_repo
 for args in "-w --stdin" "--stdin -w"; do
 	push_repo
 
-	test_expect_success "hash from stdin and write to database ($args)" '
+	test_expect_success SHA1 "hash from stdin and write to database ($args)" '
 		test $example_sha1 = $(git hash-object $args < example)
 	'
 
@@ -176,14 +176,14 @@ example"
 sha1s="$hello_sha1
 $example_sha1"
 
-test_expect_success "hash two files with names on stdin" '
+test_expect_success SHA1 "hash two files with names on stdin" '
 	test "$sha1s" = "$(echo_without_newline "$filenames" | git hash-object --stdin-paths)"
 '
 
 for args in "-w --stdin-paths" "--stdin-paths -w"; do
 	push_repo
 
-	test_expect_success "hash two files with names on stdin and write to database ($args)" '
+	test_expect_success SHA1 "hash two files with names on stdin and write to database ($args)" '
 		test "$sha1s" = "$(echo_without_newline "$filenames" | git hash-object $args)"
 	'
 
Previous: brian m. carlsonNext: brian m. carlson
Message 8 of 31 in “Hash-independent tests (part 2)”
  1. 00/28 Hash-independent tests (part 2)brian m. carlson, May 13, 2018
  2. 01/28 t/test-lib: add an SHA1 prerequisitebrian m. carlson, May 13, 2018
  3. 02/28 t/test-lib: introduce ZERO_OIDbrian m. carlson, May 13, 2018
  4. 03/28 t: switch $_z40 to $ZERO_OIDbrian m. carlson, May 13, 2018
  5. 04/28 t/test-lib: introduce OID_REGEXbrian m. carlson, May 13, 2018
  6. 05/28 t: switch $_x40 to $OID_REGEXbrian m. carlson, May 13, 2018
  7. 06/28 t0000: annotate with SHA1 prerequisitebrian m. carlson, May 13, 2018
  8. 07/28 t1007: annotate with SHA1 prerequisitebrian m. carlson, May 13, 2018
  9. 09/28 t4044: skip test if not using SHA-1brian m. carlson, May 13, 2018
  10. 11/28 t2203: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  11. 10/28 t: skip pack tests if not using SHA-1brian m. carlson, May 13, 2018
  12. 08/28 t1512: skip test if not using SHA-1brian m. carlson, May 13, 2018
  13. 12/28 t3103: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  14. 15/28 t4007: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  15. 17/28 t4014: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  16. Johannes SixtMay 13, 2018
  17. brian m. carlsonMay 13, 2018
  18. 18/28 t4020: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  19. 21/28 t4029: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  20. 19/28 t4022: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  21. 24/28 t4205: sort log output in a hash-independent waybrian m. carlson, May 13, 2018
  22. 26/28 t4045: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  23. 25/28 t4042: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  24. 28/28 t5300: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  25. 27/28 t4208: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  26. 20/28 t4029: fix test indentationbrian m. carlson, May 13, 2018
  27. 23/28 t/lib-diff-alternative: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  28. 22/28 t4030: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  29. 13/28 t3702: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  30. 16/28 t4008: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018
  31. 14/28 t3905: abstract away SHA-1-specific constantsbrian m. carlson, May 13, 2018

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.