mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-25 10:31:49 +02:00
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'.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user