summary refs log tree commit diff
path: root/tests/hash.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-03-08 21:21:05 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-03-08 21:21:05 +0100
commitd8fa1890c705ca566a56b69a4880a10dc7cf0098 (patch)
treec3f220949e5364d981a4895477249ad46852eea0 /tests/hash.scm
parent5de561a79634e0814ea22f1cfece9a09efa120be (diff)
parentfee7f8a94ec64943109ba9c37f75c28749fb18bd (diff)
downloadguix-d8fa1890c705ca566a56b69a4880a10dc7cf0098.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'tests/hash.scm')
-rw-r--r--tests/hash.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/hash.scm b/tests/hash.scm
index b4cf2b61d6..da87616eec 100644
--- a/tests/hash.scm
+++ b/tests/hash.scm
@@ -40,6 +40,14 @@
 
 (test-begin "hash")
 
+(test-equal "sha1, empty"
+  (base16-string->bytevector "da39a3ee5e6b4b0d3255bfef95601890afd80709")
+  (sha1 #vu8()))
+
+(test-equal "sha1, hello"
+  (base16-string->bytevector "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed")
+  (sha1 (string->utf8 "hello world")))
+
 (test-equal "sha256, empty"
   %empty-sha256
   (sha256 #vu8()))