aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-26 11:48:33 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-28 10:39:58 +0100
commit94c0e61fe759924625c9e27d3da8c7c0c767ea2b (patch)
treea40bc5de2f9e71a83532545367f2ecd153b1af2a /tests
parentd4aa147eecc64a00d1463d4008b22c9595041552 (diff)
downloadguix-94c0e61fe759924625c9e27d3da8c7c0c767ea2b.tar
guix-94c0e61fe759924625c9e27d3da8c7c0c767ea2b.tar.gz
inferior: Add 'inferior-eval-with-store'.
* guix/inferior.scm (inferior-eval-with-store): New procedure, with code formerly in 'inferior-package-derivation'. (inferior-package-derivation): Rewrite in terms of 'inferior-eval-with-store'. * tests/inferior.scm ("inferior-eval-with-store"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/inferior.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/inferior.scm b/tests/inferior.scm
index d1d5c00a77..d5a894ca8f 100644
--- a/tests/inferior.scm
+++ b/tests/inferior.scm
@@ -157,6 +157,15 @@
(close-inferior inferior)
result))
+(test-equal "inferior-eval-with-store"
+ (add-text-to-store %store "foo" "Hello, world!")
+ (let* ((inferior (open-inferior %top-builddir
+ #:command "scripts/guix")))
+ (inferior-eval-with-store inferior %store
+ '(lambda (store)
+ (add-text-to-store store "foo"
+ "Hello, world!")))))
+
(test-equal "inferior-package-derivation"
(map derivation-file-name
(list (package-derivation %store %bootstrap-guile "x86_64-linux")