aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYueh-Shun Li <44064051+ShamrockLee@users.noreply.github.com>2023-03-14 06:00:15 +0800
committerYueh-Shun Li <44064051+ShamrockLee@users.noreply.github.com>2023-03-16 00:50:26 +0800
commit08510c5ed0fe4b9f8266bb37c859f0ed7fa342db (patch)
tree41872559c04bda885552c1f52a9f01696d40fcaa
parent2f32303f93f0bdb73985044d9349b89d850f7e63 (diff)
test/hash.sh: add to-base32 test for nix hash
-rw-r--r--tests/hash.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/hash.sh b/tests/hash.sh
index 03cf7e875..ba678650e 100644
--- a/tests/hash.sh
+++ b/tests/hash.sh
@@ -80,6 +80,8 @@ try3() {
[ "$sri" = "$1-$4" ]
h32=$(nix-hash --type "$1" --to-base32 "$2")
[ "$h32" = "$3" ]
+ h32=$(nix hash to-base32 --type "$1" "$2")
+ [ "$h32" = "$3" ]
h16=$(nix-hash --type "$1" --to-base16 "$h32")
[ "$h16" = "$2" ]
h16=$(nix hash to-base16 --type "$1" "$h64")