diff options
author | Marius Bakke <marius@gnu.org> | 2020-06-14 16:24:34 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-06-14 16:24:34 +0200 |
commit | 4193095e18b602705df94e38a8d60ef1fe380e49 (patch) | |
tree | 2500f31bcfae9b4cb5a23d633395f6892a7bd8a7 /tests/gexp.scm | |
parent | a48a3f0640d76cb5e5945557c9aae6dabce39d93 (diff) | |
parent | e88745a655b220b4047f7db5175c828ef9c33e11 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r-- | tests/gexp.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index e073a7b816..1beeb67c21 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -78,7 +78,8 @@ (mkdir-p out) (call-with-output-file (string-append out "/hg2g.scm") (lambda (port) - (write '(define-module (hg2g) + (define defmod 'define-module) ;fool Geiser + (write `(,defmod (hg2g) #:export (the-answer)) port) (write '(define the-answer 42) port))))))))) @@ -284,6 +285,20 @@ (((thing "out")) (eq? thing file)))))) +(test-assert "file-append, raw store item" + (let* ((obj (plain-file "example.txt" "Hello!")) + (a (file-append obj "/a")) + (b (file-append a "/b")) + (c (file-append b "/c")) + (exp #~(list #$c)) + (item (run-with-store %store (lower-object obj))) + (lexp (run-with-store %store (lower-gexp exp)))) + (and (equal? (lowered-gexp-sexp lexp) + `(list ,(string-append item "/a/b/c"))) + (equal? (lowered-gexp-sources lexp) + (list item)) + (null? (lowered-gexp-inputs lexp))))) + (test-assertm "with-parameters for %current-system" (mlet* %store-monad ((system -> (match (%current-system) ("aarch64-linux" "x86_64-linux") |