[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: tests: Add an indirection for white-box testing.
From: |
Ludovic Courtès |
Subject: |
01/07: tests: Add an indirection for white-box testing. |
Date: |
Mon, 16 Mar 2015 22:27:50 +0000 |
civodul pushed a commit to branch wip-extensible-gexps
in repository guix.
commit 3f964ed9b01c332b2613ba1c71a377646219cef1
Author: Ludovic Courtès <address@hidden>
Date: Sat Mar 14 22:28:39 2015 +0100
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.
---
tests/gexp.scm | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 783ca2c..ac2842d 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
- branch wip-extensible-gexps created (now 20a3daa), Ludovic Courtès, 2015/03/16
- 01/07: tests: Add an indirection for white-box testing.,
Ludovic Courtès <=
- 02/07: gexp: Rename <output-ref> to <gexp-output>., Ludovic Courtès, 2015/03/16
- 03/07: gexp: Add <gexp-input>., Ludovic Courtès, 2015/03/16
- 04/07: gexp: Export 'gexp-input' constructor., Ludovic Courtès, 2015/03/16
- 05/07: profiles: Use 'gexp-input' instead of two-element lists., Ludovic Courtès, 2015/03/16
- 06/07: gexp: Remove special meaning of forms (PACKAGE OUTPUT) in ungexp., Ludovic Courtès, 2015/03/16
- 07/07: gexp: Separate "compilers" for origins and packages from the core., Ludovic Courtès, 2015/03/16