summaryrefslogtreecommitdiff
path: root/t/README
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-10-10 12:37:16 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-10-10 12:37:16 +0900
commitd555663f16fb1bc28ebc44a4e78ff4e277c3b69e (patch)
tree594a810932672a5dce8fb9e7fac51c9969b1b281 /t/README
parentMerge branch 'nd/test-tool' (diff)
parentt5318: use test_oid for HASH_LEN (diff)
downloadtgif-d555663f16fb1bc28ebc44a4e78ff4e277c3b69e.tar.xz
Merge branch 'bc/hash-independent-tests'
Various tests have been updated to make it easier to swap the hash function used for object identification. * bc/hash-independent-tests: t5318: use test_oid for HASH_LEN t1407: make hash size independent t1406: make hash-size independent t1405: make hash size independent t1400: switch hard-coded object ID to variable t1006: make hash size independent t0064: make hash size independent t0002: abstract away SHA-1 specific constants t0000: update tests for SHA-256 t0000: use hash translation table t: add test functions to translate hash-related values
Diffstat (limited to 't/README')
-rw-r--r--t/README22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/README b/t/README
index 3ea6c85460..5e48a043ce 100644
--- a/t/README
+++ b/t/README
@@ -814,6 +814,28 @@ library for your script to use.
the symbolic link in the file system and a part that does; then only
the latter part need be protected by a SYMLINKS prerequisite (see below).
+ - test_oid_init
+
+ This function loads facts and useful object IDs related to the hash
+ algorithm(s) in use from the files in t/oid-info.
+
+ - test_oid_cache
+
+ This function reads per-hash algorithm information from standard
+ input (usually a heredoc) in the format described in
+ t/oid-info/README. This is useful for test-specific values, such as
+ object IDs, which must vary based on the hash algorithm.
+
+ Certain fixed values, such as hash sizes and common placeholder
+ object IDs, can be loaded with test_oid_init (described above).
+
+ - test_oid <key>
+
+ This function looks up a value for the hash algorithm in use, based
+ on the key given. The value must have been loaded using
+ test_oid_init or test_oid_cache. Providing an unknown key is an
+ error.
+
Prerequisites
-------------