summaryrefslogtreecommitdiff
path: root/tests/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-06-09 16:34:18 +0200
committerLudovic Courtès <ludo@gnu.org>2012-06-09 16:34:18 +0200
commit6d800a80eaa2a221ee44617fdd702bf7c92f22ed (patch)
treecea3bb6e835a27f0234f838eb1b4c3018e9930c7 /tests/utils.scm
parentc8369caccef256f9e7bfa02ac2cc7fcbd72db04f (diff)
Add `base16-string->bytevector'.
* guix/utils.scm (base16-string->bytevector): New procedure. * tests/utils.scm ("bytevector->base16-string->bytevector"): New test.
Diffstat (limited to 'tests/utils.scm')
-rw-r--r--tests/utils.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/utils.scm b/tests/utils.scm
index edea11db720..db4eb5a3408 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -62,6 +62,13 @@
62 ;; Examples from RFC 4648. 62 ;; Examples from RFC 4648.
63 (map string->utf8 '("" "f" "fo" "foo" "foob" "fooba" "foobar")))) 63 (map string->utf8 '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
64 64
65(test-assert "bytevector->base16-string->bytevector"
66 (every (lambda (bv)
67 (equal? (base16-string->bytevector
68 (bytevector->base16-string bv))
69 bv))
70 (map string->utf8 '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
71
65;; The following tests requires `nix-hash' in $PATH. 72;; The following tests requires `nix-hash' in $PATH.
66(test-skip (if (false-if-exception (system* "nix-hash" "--version")) 73(test-skip (if (false-if-exception (system* "nix-hash" "--version"))
67 0 74 0