diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-06-03 11:45:27 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-06-03 11:47:36 +0200 |
commit | 558e8b11d77ed79c1ae0baf5fda66cfc083bab4b (patch) | |
tree | 0ce333a9bea9554192c9c26b8ec0b6cb114383ab /tests | |
parent | 74d441abeee257f5d7ec5bb5fa0db70bd26802b7 (diff) | |
download | guix-558e8b11d77ed79c1ae0baf5fda66cfc083bab4b.tar.gz guix-558e8b11d77ed79c1ae0baf5fda66cfc083bab4b.zip |
gexp: Add 'plain-file'.
* guix/gexp.scm (<plain-file>): 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'.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gexp.scm | 10 |
1 files changed, 10 insertions, 0 deletions
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)) |