summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-14 22:28:39 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-17 22:25:54 +0100
commit1f9760339e8d56b72902300c621242022ef1015c (patch)
treefcad02d9026c6fa38fccf325c18934223f00cf39 /tests
parent708155dfcb9e6611b6d8bfc8a781835e0ee16af3 (diff)
downloadguix-1f9760339e8d56b72902300c621242022ef1015c.tar.gz
tests: Add an indirection for white-box testing.
* tests/gexp.scm (gexp-inputs, gexp-native-inputs, gexp-outputs,
  gexp->sexp): Make an indirection, to facilitate live testing with
  Geiser.
Diffstat (limited to 'tests')
-rw-r--r--tests/gexp.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 783ca2cdbc..ac2842d287 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -40,10 +40,14 @@
   (open-connection-for-tests))
 
 ;; For white-box testing.
-(define gexp-inputs (@@ (guix gexp) gexp-inputs))
-(define gexp-native-inputs (@@ (guix gexp) gexp-native-inputs))
-(define gexp-outputs (@@ (guix gexp) gexp-outputs))
-(define gexp->sexp  (@@ (guix gexp) gexp->sexp))
+(define (gexp-inputs x)
+  ((@@ (guix gexp) gexp-inputs) x))
+(define (gexp-native-inputs x)
+  ((@@ (guix gexp) gexp-native-inputs) x))
+(define (gexp-outputs x)
+  ((@@ (guix gexp) gexp-outputs) x))
+(define (gexp->sexp . x)
+  (apply (@@ (guix gexp) gexp->sexp) x))
 
 (define* (gexp->sexp* exp #:optional target)
   (run-with-store %store (gexp->sexp exp