aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-06-23 16:33:38 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-27 23:42:20 +0200
commit8e6c1415d87272c0221ce328715fc0dd1dd3e032 (patch)
treeb873e8b22ddd2c486f428fae15bc18f95755f78e /tests
parent8dc6c387852bb9505be44567a5f56913633cc23a (diff)
downloadguix-8e6c1415d87272c0221ce328715fc0dd1dd3e032.tar
guix-8e6c1415d87272c0221ce328715fc0dd1dd3e032.tar.gz
daemon: Recognize SHA3 and BLAKE2s.
* nix/libutil/hash.hh (HashType): Add htSHA3_256, htSHA3_512, and htBLAKE2s_256. * nix/libutil/hash.cc (parseHashType, printHashType): Recognize them. * tests/store.scm ("add-to-store"): Test these algorithms.
Diffstat (limited to 'tests')
-rw-r--r--tests/store.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/store.scm b/tests/store.scm
index 06f7939657..ee3e01f33b 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -116,7 +116,7 @@
(list (stat:uid s) (stat:perms s))))
(test-equal "add-to-store"
- '("sha1" "sha256" "sha512")
+ '("sha1" "sha256" "sha512" "sha3-256" "sha3-512" "blake2s-256")
(let* ((file (search-path %load-path "guix.scm"))
(content (call-with-input-file file get-bytevector-all)))
(map (lambda (hash-algo)
@@ -125,7 +125,7 @@
(bytevector=? (call-with-input-file file get-bytevector-all)
content)
hash-algo)))
- '("sha1" "sha256" "sha512"))))
+ '("sha1" "sha256" "sha512" "sha3-256" "sha3-512" "blake2s-256"))))
(test-equal "add-data-to-store"
#vu8(1 2 3 4 5)