summaryrefslogtreecommitdiff
path: root/tests/guix-hash.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-01-03 21:59:49 +0100
committerLudovic Courtès <ludo@gnu.org>2021-01-04 11:51:48 +0100
commited63b7f87e88b0ce9c4a78bf0529599de9172b1f (patch)
tree5c40a3dcaf5c1efe1ff7e0155dbbc02552b509ba /tests/guix-hash.sh
parentd005f809f8209dfb3e4b4ee02b6f2beeb1d8f2e6 (diff)
guix hash: Honor '-H' when used alongside '-r'.
* guix/scripts/hash.scm (guix-hash): When 'recursive? is true, use 'open-hash-port' instead of 'open-sha256-port'. * tests/guix-hash.sh: Add test for 'guix hash -r -H sha512'.
Diffstat (limited to 'tests/guix-hash.sh')
-rw-r--r--tests/guix-hash.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/guix-hash.sh b/tests/guix-hash.sh
index 346355539fc..c4461fa955f 100644
--- a/tests/guix-hash.sh
+++ b/tests/guix-hash.sh
@@ -1,5 +1,5 @@
1# GNU Guix --- Functional package management for GNU 1# GNU Guix --- Functional package management for GNU
2# Copyright © 2013, 2014, 2016, 2020 Ludovic Courtès <ludo@gnu.org> 2# Copyright © 2013, 2014, 2016, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
3# Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> 3# Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
4# 4#
5# This file is part of GNU Guix. 5# This file is part of GNU Guix.
@@ -43,6 +43,7 @@ chmod +x "$tmpdir/exe"
43mkdir "$tmpdir/subdir" 43mkdir "$tmpdir/subdir"
44 44
45test `guix hash -r "$tmpdir"` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p 45test `guix hash -r "$tmpdir"` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p
46test `guix hash -r "$tmpdir" -H sha512` = 301ra58c2vahczzxiyfin41mpyb0ljh4dh9zn3ijvwviaw1j40sfzw5skh9x945da88n3785ggifzig7acd6k72h0mpsc20m1f66m9n
46 47
47# Without '-r', this should fail. 48# Without '-r', this should fail.
48! guix hash "$tmpdir" 49! guix hash "$tmpdir"