t1007: annotate with SHA1 prerequisite

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed May 13, 2018 at 02:24 UTC 0fbdb52f9eb1b73cb207891e00ce18c2d20ed6c9
1 file changed +8 -8
t/t1007-hash-object.sh
+8 -8
@@ -9,13 +9,13 @@ echo_without_newline() {
9 }
10
11 test_blob_does_not_exist() {
12 - test_expect_success 'blob does not exist in database' "
12 + test_expect_success SHA1 'blob does not exist in database' "
13 test_must_fail git cat-file blob $1
14 "
15 }
16
17 test_blob_exists() {
18 - test_expect_success 'blob exists in database' "
18 + test_expect_success SHA1 'blob exists in database' "
19 git cat-file blob $1
20 "
21 }
@@ -73,19 +73,19 @@ test_expect_success "Can't use --path with --no-filters" '
73
74 push_repo
75
76 -test_expect_success 'hash a file' '
76 +test_expect_success SHA1 'hash a file' '
77 test $hello_sha1 = $(git hash-object hello)
78 '
79
80 test_blob_does_not_exist $hello_sha1
81
82 -test_expect_success 'hash from stdin' '
82 +test_expect_success SHA1 'hash from stdin' '
83 test $example_sha1 = $(git hash-object --stdin < example)
84 '
85
86 test_blob_does_not_exist $example_sha1
87
88 -test_expect_success 'hash a file and write to database' '
88 +test_expect_success SHA1 'hash a file and write to database' '
89 test $hello_sha1 = $(git hash-object -w hello)
90 '
91
@@ -161,7 +161,7 @@ pop_repo
161 for args in "-w --stdin" "--stdin -w"; do
162 push_repo
163
164 - test_expect_success "hash from stdin and write to database ($args)" '
164 + test_expect_success SHA1 "hash from stdin and write to database ($args)" '
165 test $example_sha1 = $(git hash-object $args < example)
166 '
167
@@ -176,14 +176,14 @@ example"
176 sha1s="$hello_sha1
177 $example_sha1"
178
179 -test_expect_success "hash two files with names on stdin" '
179 +test_expect_success SHA1 "hash two files with names on stdin" '
180 test "$sha1s" = "$(echo_without_newline "$filenames" | git hash-object --stdin-paths)"
181 '
182
183 for args in "-w --stdin-paths" "--stdin-paths -w"; do
184 push_repo
185
186 - test_expect_success "hash two files with names on stdin and write to database ($args)" '
186 + test_expect_success SHA1 "hash two files with names on stdin and write to database ($args)" '
187 test "$sha1s" = "$(echo_without_newline "$filenames" | git hash-object $args)"
188 '
189