diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-09-09 17:40:35 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-09-09 17:40:35 +0200 |
commit | 0aeb13485055975d71ec8283040f007c79599bba (patch) | |
tree | a06139136c809b00d166d6d66bdf757f20566704 /tests/gexp.scm | |
parent | b03f270e3d5ab5315b50ef3ebac35735cc28d4a2 (diff) | |
parent | 0084744b3af0a6f8e125120143f57567902339a8 (diff) | |
download | patches-0aeb13485055975d71ec8283040f007c79599bba.tar patches-0aeb13485055975d71ec8283040f007c79599bba.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r-- | tests/gexp.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index a0ed34aa6d..380b83509a 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -1093,6 +1093,24 @@ (call-with-input-file out get-string-all)) (equal? refs (list guile)))))))) +(test-assertm "file-union" + (mlet* %store-monad ((union -> (file-union "union" + `(("a" ,(plain-file "a" "1")) + ("b/c/d" ,(plain-file "d" "2")) + ("e" ,(plain-file "e" "3"))))) + (drv (lower-object union)) + (out -> (derivation->output-path drv))) + (define (contents=? file str) + (string=? (call-with-input-file (string-append out "/" file) + get-string-all) + str)) + + (mbegin %store-monad + (built-derivations (list drv)) + (return (and (contents=? "a" "1") + (contents=? "b/c/d" "2") + (contents=? "e" "3")))))) + (test-assert "gexp->derivation vs. %current-target-system" (let ((mval (gexp->derivation "foo" #~(begin |