summary refs log tree commit diff
path: root/tests/uuid.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-05-21 13:22:32 -0400
committerMark H Weaver <mhw@netris.org>2018-05-21 13:22:32 -0400
commit0661758e133c0384d20043d3526b5ebc794e1f04 (patch)
tree46fb6d731fd0e562379ecfffba499deb17847a23 /tests/uuid.scm
parent539bf8f2c071b53834829259bb3fabf0390c5dc6 (diff)
parentc036959b1a61c37c9b7d72e655e1441f2feefb6e (diff)
downloadguix-0661758e133c0384d20043d3526b5ebc794e1f04.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/uuid.scm')
-rw-r--r--tests/uuid.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/uuid.scm b/tests/uuid.scm
index 91a3482490..260614f079 100644
--- a/tests/uuid.scm
+++ b/tests/uuid.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,6 +57,13 @@
   "1234-ABCD"
   (uuid->string (uuid "1234-abcd" 'fat32)))
 
+(test-assert "uuid, dynamic value"
+  (let* ((good "4dab5feb-d176-45de-b287-9b0a6e4c01cb")
+         (bad  (string-drop good 3)))
+    (and (uuid? (uuid good))
+         (string=? good (uuid->string (uuid good)))
+         (not (uuid bad)))))
+
 (test-assert "uuid=?"
   (and (uuid=? (uuid-bytevector (uuid "1234-abcd" 'fat32))
                (uuid "1234-abcd" 'fat32))