From 558e8b11d77ed79c1ae0baf5fda66cfc083bab4b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 3 Jun 2015 11:45:27 +0200 Subject: gexp: Add 'plain-file'. * guix/gexp.scm (): New type. (plain-file, plain-file-compiler): New procedures. * tests/gexp.scm ("one plain file"): New test. * doc/guix.texi (G-Expressions): Document 'plain-file'. --- tests/gexp.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/gexp.scm b/tests/gexp.scm index f81ef39860..7e14073fd4 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -109,6 +109,16 @@ (eq? x local))) (equal? `(display ,intd) (gexp->sexp* exp))))) +(test-assert "one plain file" + (let* ((file (plain-file "hi" "Hello, world!")) + (exp (gexp (display (ungexp file)))) + (expected (add-text-to-store %store "hi" "Hello, world!"))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((x "out")) + (eq? x file))) + (equal? `(display ,expected) (gexp->sexp* exp))))) + (test-assert "same input twice" (let ((exp (gexp (begin (display (ungexp coreutils)) -- cgit v1.2.3