aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-02-28 21:29:53 +0100
committerLudovic Courtès <ludo@gnu.org>2021-03-30 22:48:44 +0200
commitda86e90efe796ee68ee0a5ccaf46f45cadb52336 (patch)
treef41ead1149e88e133c3c2a78b643a85dd718efcd /tests
parent4f5f1d98efe4343cd301d684094a00b82e069f1d (diff)
downloadguix-da86e90efe796ee68ee0a5ccaf46f45cadb52336.tar
guix-da86e90efe796ee68ee0a5ccaf46f45cadb52336.tar.gz
gexp: Add 'sexp->gexp'.
* guix/gexp.scm (sexp->gexp): New procedure. * tests/gexp.scm ("sexp->gexp"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/gexp.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 834e78b9a0..64c3107ef7 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -96,6 +96,13 @@
(null? (gexp-inputs exp))
(gexp->sexp* exp))))
+(test-equal "sexp->gexp"
+ '(a b (c d) e)
+ (let ((exp (sexp->gexp '(a b (c d) e))))
+ (and (gexp? exp)
+ (null? (gexp-inputs exp))
+ (gexp->sexp* exp))))
+
(test-equal "unquote"
'(display `(foo ,(+ 2 3)))
(let ((exp (gexp (display `(foo ,(+ 2 3))))))