diff options
author | Marius Bakke <marius@gnu.org> | 2020-05-29 23:36:38 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-05-29 23:36:38 +0200 |
commit | fe6d003908fd8278de65761bc550240c520ef9f4 (patch) | |
tree | abe88c7905a8907ddafc554fbeef5b0af08f835d /tests | |
parent | 8a7a5dc7805f4628e60f90af6b2416f951d0c034 (diff) | |
parent | 031315e4f0fbc4e04ffc8adee04128c23173a1f7 (diff) | |
download | guix-fe6d003908fd8278de65761bc550240c520ef9f4.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-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") |