Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / tests / gexp.scm
CommitLineData
21b679f6 1;;; GNU Guix --- Functional package management for GNU
462a3fa3 2;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
21b679f6
LC
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (test-gexp)
20 #:use-module (guix store)
21 #:use-module (guix monads)
22 #:use-module (guix gexp)
23 #:use-module (guix derivations)
79c0c8cd 24 #:use-module (guix packages)
c1bc358f 25 #:use-module (guix tests)
21b679f6
LC
26 #:use-module (gnu packages)
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages bootstrap)
29 #:use-module (srfi srfi-1)
c8351d9a 30 #:use-module (srfi srfi-34)
21b679f6
LC
31 #:use-module (srfi srfi-64)
32 #:use-module (rnrs io ports)
33 #:use-module (ice-9 match)
2cf0ea0d 34 #:use-module (ice-9 regex)
21b679f6
LC
35 #:use-module (ice-9 popen))
36
37;; Test the (guix gexp) module.
38
39(define %store
c1bc358f 40 (open-connection-for-tests))
21b679f6
LC
41
42;; For white-box testing.
43(define gexp-inputs (@@ (guix gexp) gexp-inputs))
667b2508 44(define gexp-native-inputs (@@ (guix gexp) gexp-native-inputs))
4b23c466 45(define gexp-outputs (@@ (guix gexp) gexp-outputs))
21b679f6
LC
46(define gexp->sexp (@@ (guix gexp) gexp->sexp))
47
667b2508 48(define* (gexp->sexp* exp #:optional target)
68a61e9f 49 (run-with-store %store (gexp->sexp exp
68a61e9f 50 #:target target)
c1bc358f 51 #:guile-for-build (%guile-for-build)))
21b679f6
LC
52
53(define-syntax-rule (test-assertm name exp)
54 (test-assert name
55 (run-with-store %store exp
c1bc358f 56 #:guile-for-build (%guile-for-build))))
21b679f6
LC
57
58\f
59(test-begin "gexp")
60
61(test-equal "no refs"
62 '(display "hello!")
63 (let ((exp (gexp (display "hello!"))))
64 (and (gexp? exp)
65 (null? (gexp-inputs exp))
66 (gexp->sexp* exp))))
67
68(test-equal "unquote"
69 '(display `(foo ,(+ 2 3)))
70 (let ((exp (gexp (display `(foo ,(+ 2 3))))))
71 (and (gexp? exp)
72 (null? (gexp-inputs exp))
73 (gexp->sexp* exp))))
74
75(test-assert "one input package"
76 (let ((exp (gexp (display (ungexp coreutils)))))
77 (and (gexp? exp)
78 (match (gexp-inputs exp)
79 (((p "out"))
80 (eq? p coreutils)))
81 (equal? `(display ,(derivation->output-path
82 (package-derivation %store coreutils)))
83 (gexp->sexp* exp)))))
84
79c0c8cd
LC
85(test-assert "one input origin"
86 (let ((exp (gexp (display (ungexp (package-source coreutils))))))
87 (and (gexp? exp)
88 (match (gexp-inputs exp)
89 (((o "out"))
90 (eq? o (package-source coreutils))))
91 (equal? `(display ,(derivation->output-path
92 (package-source-derivation
93 %store (package-source coreutils))))
94 (gexp->sexp* exp)))))
95
21b679f6
LC
96(test-assert "same input twice"
97 (let ((exp (gexp (begin
98 (display (ungexp coreutils))
99 (display (ungexp coreutils))))))
100 (and (gexp? exp)
101 (match (gexp-inputs exp)
102 (((p "out"))
103 (eq? p coreutils)))
104 (let ((e `(display ,(derivation->output-path
105 (package-derivation %store coreutils)))))
106 (equal? `(begin ,e ,e) (gexp->sexp* exp))))))
107
108(test-assert "two input packages, one derivation, one file"
109 (let* ((drv (build-expression->derivation
110 %store "foo" 'bar
111 #:guile-for-build (package-derivation %store %bootstrap-guile)))
112 (txt (add-text-to-store %store "foo" "Hello, world!"))
113 (exp (gexp (begin
114 (display (ungexp coreutils))
115 (display (ungexp %bootstrap-guile))
116 (display (ungexp drv))
117 (display (ungexp txt))))))
118 (define (match-input thing)
119 (match-lambda
120 ((drv-or-pkg _ ...)
121 (eq? thing drv-or-pkg))))
122
123 (and (gexp? exp)
124 (= 4 (length (gexp-inputs exp)))
125 (every (lambda (input)
126 (find (match-input input) (gexp-inputs exp)))
127 (list drv coreutils %bootstrap-guile txt))
128 (let ((e0 `(display ,(derivation->output-path
129 (package-derivation %store coreutils))))
130 (e1 `(display ,(derivation->output-path
131 (package-derivation %store %bootstrap-guile))))
132 (e2 `(display ,(derivation->output-path drv)))
133 (e3 `(display ,txt)))
134 (equal? `(begin ,e0 ,e1 ,e2 ,e3) (gexp->sexp* exp))))))
135
667b2508
LC
136(test-assert "ungexp + ungexp-native"
137 (let* ((exp (gexp (list (ungexp-native %bootstrap-guile)
138 (ungexp coreutils)
139 (ungexp-native glibc)
140 (ungexp binutils))))
141 (target "mips64el-linux")
142 (guile (derivation->output-path
143 (package-derivation %store %bootstrap-guile)))
144 (cu (derivation->output-path
145 (package-cross-derivation %store coreutils target)))
146 (libc (derivation->output-path
147 (package-derivation %store glibc)))
148 (bu (derivation->output-path
149 (package-cross-derivation %store binutils target))))
150 (and (lset= equal?
151 `((,%bootstrap-guile "out") (,glibc "out"))
152 (gexp-native-inputs exp))
153 (lset= equal?
154 `((,coreutils "out") (,binutils "out"))
155 (gexp-inputs exp))
156 (equal? `(list ,guile ,cu ,libc ,bu)
157 (gexp->sexp* exp target)))))
158
21b679f6
LC
159(test-assert "input list"
160 (let ((exp (gexp (display
161 '(ungexp (list %bootstrap-guile coreutils)))))
162 (guile (derivation->output-path
163 (package-derivation %store %bootstrap-guile)))
164 (cu (derivation->output-path
165 (package-derivation %store coreutils))))
166 (and (lset= equal?
167 `((,%bootstrap-guile "out") (,coreutils "out"))
168 (gexp-inputs exp))
169 (equal? `(display '(,guile ,cu))
170 (gexp->sexp* exp)))))
171
667b2508
LC
172(test-assert "input list + ungexp-native"
173 (let* ((target "mips64el-linux")
174 (exp (gexp (display
175 (cons '(ungexp-native (list %bootstrap-guile coreutils))
176 '(ungexp (list glibc binutils))))))
177 (guile (derivation->output-path
178 (package-derivation %store %bootstrap-guile)))
179 (cu (derivation->output-path
180 (package-derivation %store coreutils)))
181 (xlibc (derivation->output-path
182 (package-cross-derivation %store glibc target)))
183 (xbu (derivation->output-path
184 (package-cross-derivation %store binutils target))))
185 (and (lset= equal?
186 `((,%bootstrap-guile "out") (,coreutils "out"))
187 (gexp-native-inputs exp))
188 (lset= equal?
189 `((,glibc "out") (,binutils "out"))
190 (gexp-inputs exp))
191 (equal? `(display (cons '(,guile ,cu) '(,xlibc ,xbu)))
192 (gexp->sexp* exp target)))))
193
21b679f6
LC
194(test-assert "input list splicing"
195 (let* ((inputs (list (list glibc "debug") %bootstrap-guile))
196 (outputs (list (derivation->output-path
197 (package-derivation %store glibc)
198 "debug")
199 (derivation->output-path
200 (package-derivation %store %bootstrap-guile))))
201 (exp (gexp (list (ungexp-splicing (cons (+ 2 3) inputs))))))
202 (and (lset= equal?
203 `((,glibc "debug") (,%bootstrap-guile "out"))
204 (gexp-inputs exp))
205 (equal? (gexp->sexp* exp)
206 `(list ,@(cons 5 outputs))))))
207
667b2508
LC
208(test-assert "input list splicing + ungexp-native-splicing"
209 (let* ((inputs (list (list glibc "debug") %bootstrap-guile))
210 (exp (gexp (list (ungexp-native-splicing (cons (+ 2 3) inputs))))))
211 (and (lset= equal?
212 `((,glibc "debug") (,%bootstrap-guile "out"))
213 (gexp-native-inputs exp))
214 (null? (gexp-inputs exp))
215 (equal? (gexp->sexp* exp) ;native
216 (gexp->sexp* exp "mips64el-linux")))))
217
4b23c466
LC
218(test-equal "output list"
219 2
220 (let ((exp (gexp (begin (mkdir (ungexp output))
221 (mkdir (ungexp output "bar"))))))
222 (length (gexp-outputs exp)))) ;XXX: <output-ref> is private
223
224(test-assert "output list, combined gexps"
225 (let* ((exp0 (gexp (mkdir (ungexp output))))
226 (exp1 (gexp (mkdir (ungexp output "foo"))))
227 (exp2 (gexp (begin (display "hi!") (ungexp exp0) (ungexp exp1)))))
228 (and (lset= equal?
229 (append (gexp-outputs exp0) (gexp-outputs exp1))
230 (gexp-outputs exp2))
231 (= 2 (length (gexp-outputs exp2))))))
232
f9efe568
LC
233(test-assert "output list + ungexp-splicing list, combined gexps"
234 (let* ((exp0 (gexp (mkdir (ungexp output))))
235 (exp1 (gexp (mkdir (ungexp output "foo"))))
236 (exp2 (gexp (begin (display "hi!")
237 (ungexp-splicing (list exp0 exp1))))))
238 (and (lset= equal?
239 (append (gexp-outputs exp0) (gexp-outputs exp1))
240 (gexp-outputs exp2))
241 (= 2 (length (gexp-outputs exp2))))))
242
21b679f6
LC
243(test-assertm "gexp->file"
244 (mlet* %store-monad ((exp -> (gexp (display (ungexp %bootstrap-guile))))
245 (guile (package-file %bootstrap-guile))
246 (sexp (gexp->sexp exp))
247 (drv (gexp->file "foo" exp))
248 (out -> (derivation->output-path drv))
249 (done (built-derivations (list drv)))
250 (refs ((store-lift references) out)))
251 (return (and (equal? sexp (call-with-input-file out read))
252 (equal? (list guile) refs)))))
253
254(test-assertm "gexp->derivation"
255 (mlet* %store-monad ((file (text-file "foo" "Hello, world!"))
256 (exp -> (gexp
257 (begin
258 (mkdir (ungexp output))
259 (chdir (ungexp output))
260 (symlink
261 (string-append (ungexp %bootstrap-guile)
262 "/bin/guile")
263 "foo")
264 (symlink (ungexp file)
265 (ungexp output "2nd")))))
266 (drv (gexp->derivation "foo" exp))
267 (out -> (derivation->output-path drv))
268 (out2 -> (derivation->output-path drv "2nd"))
269 (done (built-derivations (list drv)))
270 (refs ((store-lift references) out))
271 (refs2 ((store-lift references) out2))
272 (guile (package-file %bootstrap-guile "bin/guile")))
273 (return (and (string=? (readlink (string-append out "/foo")) guile)
274 (string=? (readlink out2) file)
275 (equal? refs (list (dirname (dirname guile))))
276 (equal? refs2 (list file))))))
277
ce45eb4c
LC
278(test-assertm "gexp->derivation vs. grafts"
279 (mlet* %store-monad ((p0 -> (dummy-package "dummy"
280 (arguments
281 '(#:implicit-inputs? #f))))
282 (r -> (package (inherit p0) (name "DuMMY")))
283 (p1 -> (package (inherit p0) (replacement r)))
284 (exp0 -> (gexp (frob (ungexp p0) (ungexp output))))
285 (exp1 -> (gexp (frob (ungexp p1) (ungexp output))))
286 (void (set-guile-for-build %bootstrap-guile))
287 (drv0 (gexp->derivation "t" exp0))
288 (drv1 (gexp->derivation "t" exp1))
289 (drv1* (gexp->derivation "t" exp1 #:graft? #f)))
290 (return (and (not (string=? (derivation->output-path drv0)
291 (derivation->output-path drv1)))
292 (string=? (derivation->output-path drv0)
293 (derivation->output-path drv1*))))))
294
21b679f6
LC
295(test-assertm "gexp->derivation, composed gexps"
296 (mlet* %store-monad ((exp0 -> (gexp (begin
297 (mkdir (ungexp output))
298 (chdir (ungexp output)))))
299 (exp1 -> (gexp (symlink
300 (string-append (ungexp %bootstrap-guile)
301 "/bin/guile")
302 "foo")))
303 (exp -> (gexp (begin (ungexp exp0) (ungexp exp1))))
304 (drv (gexp->derivation "foo" exp))
305 (out -> (derivation->output-path drv))
306 (done (built-derivations (list drv)))
307 (guile (package-file %bootstrap-guile "bin/guile")))
308 (return (string=? (readlink (string-append out "/foo"))
309 guile))))
310
5d098459
LC
311(test-assertm "gexp->derivation, default system"
312 ;; The default system should be the one at '>>=' time, not the one at
313 ;; invocation time. See <http://bugs.gnu.org/18002>.
314 (let ((system (%current-system))
315 (mdrv (parameterize ((%current-system "foobar64-linux"))
316 (gexp->derivation "foo"
317 (gexp
318 (mkdir (ungexp output)))))))
319 (mlet %store-monad ((drv mdrv))
320 (return (string=? system (derivation-system drv))))))
321
68a61e9f
LC
322(test-assertm "gexp->derivation, cross-compilation"
323 (mlet* %store-monad ((target -> "mips64el-linux")
324 (exp -> (gexp (list (ungexp coreutils)
325 (ungexp output))))
326 (xdrv (gexp->derivation "foo" exp
327 #:target target))
328 (refs ((store-lift references)
329 (derivation-file-name xdrv)))
330 (xcu (package->cross-derivation coreutils
331 target))
332 (cu (package->derivation coreutils)))
333 (return (and (member (derivation-file-name xcu) refs)
334 (not (member (derivation-file-name cu) refs))))))
335
667b2508
LC
336(test-assertm "gexp->derivation, ungexp-native"
337 (mlet* %store-monad ((target -> "mips64el-linux")
338 (exp -> (gexp (list (ungexp-native coreutils)
339 (ungexp output))))
340 (xdrv (gexp->derivation "foo" exp
341 #:target target))
342 (drv (gexp->derivation "foo" exp)))
343 (return (string=? (derivation-file-name drv)
344 (derivation-file-name xdrv)))))
345
346(test-assertm "gexp->derivation, ungexp + ungexp-native"
347 (mlet* %store-monad ((target -> "mips64el-linux")
348 (exp -> (gexp (list (ungexp-native coreutils)
349 (ungexp glibc)
350 (ungexp output))))
351 (xdrv (gexp->derivation "foo" exp
352 #:target target))
353 (refs ((store-lift references)
354 (derivation-file-name xdrv)))
355 (xglibc (package->cross-derivation glibc target))
356 (cu (package->derivation coreutils)))
357 (return (and (member (derivation-file-name cu) refs)
358 (member (derivation-file-name xglibc) refs)))))
359
360(test-assertm "gexp->derivation, ungexp-native + composed gexps"
361 (mlet* %store-monad ((target -> "mips64el-linux")
362 (exp0 -> (gexp (list 1 2
363 (ungexp coreutils))))
364 (exp -> (gexp (list 0 (ungexp-native exp0))))
365 (xdrv (gexp->derivation "foo" exp
366 #:target target))
367 (drv (gexp->derivation "foo" exp)))
368 (return (string=? (derivation-file-name drv)
369 (derivation-file-name xdrv)))))
370
6fd1a796
LC
371(test-assertm "gexp->derivation, store copy"
372 (let ((build-one #~(call-with-output-file #$output
373 (lambda (port)
374 (display "This is the one." port))))
375 (build-two (lambda (one)
376 #~(begin
377 (mkdir #$output)
378 (symlink #$one (string-append #$output "/one"))
379 (call-with-output-file (string-append #$output "/two")
380 (lambda (port)
381 (display "This is the second one." port))))))
b53833b2
LC
382 (build-drv #~(begin
383 (use-modules (guix build store-copy))
6fd1a796 384
b53833b2
LC
385 (mkdir #$output)
386 (populate-store '("graph") #$output))))
6fd1a796
LC
387 (mlet* %store-monad ((one (gexp->derivation "one" build-one))
388 (two (gexp->derivation "two" (build-two one)))
b53833b2 389 (drv (gexp->derivation "store-copy" build-drv
6fd1a796 390 #:references-graphs
b53833b2 391 `(("graph" ,two))
6fd1a796
LC
392 #:modules
393 '((guix build store-copy)
394 (guix build utils))))
395 (ok? (built-derivations (list drv)))
396 (out -> (derivation->output-path drv)))
397 (let ((one (derivation->output-path one))
398 (two (derivation->output-path two)))
399 (return (and ok?
400 (file-exists? (string-append out "/" one))
401 (file-exists? (string-append out "/" two))
402 (file-exists? (string-append out "/" two "/two"))
403 (string=? (readlink (string-append out "/" two "/one"))
404 one)))))))
405
aa72d9af
LC
406(test-assertm "imported-files"
407 (mlet* %store-monad
408 ((files -> `(("x" . ,(search-path %load-path "ice-9/q.scm"))
409 ("a/b/c" . ,(search-path %load-path
410 "guix/derivations.scm"))
411 ("p/q" . ,(search-path %load-path "guix.scm"))
412 ("p/z" . ,(search-path %load-path "guix/store.scm"))))
413 (drv (imported-files files)))
414 (mbegin %store-monad
415 (built-derivations (list drv))
416 (let ((dir (derivation->output-path drv)))
417 (return
418 (every (match-lambda
419 ((path . source)
420 (equal? (call-with-input-file (string-append dir "/" path)
421 get-bytevector-all)
422 (call-with-input-file source
423 get-bytevector-all))))
424 files))))))
425
426(test-assertm "gexp->derivation #:modules"
427 (mlet* %store-monad
428 ((build -> #~(begin
429 (use-modules (guix build utils))
430 (mkdir-p (string-append #$output "/guile/guix/nix"))
431 #t))
432 (drv (gexp->derivation "test-with-modules" build
433 #:modules '((guix build utils)))))
434 (mbegin %store-monad
435 (built-derivations (list drv))
436 (let* ((p (derivation->output-path drv))
437 (s (stat (string-append p "/guile/guix/nix"))))
438 (return (eq? (stat:type s) 'directory))))))
439
b53833b2
LC
440(test-assertm "gexp->derivation #:references-graphs"
441 (mlet* %store-monad
442 ((one (text-file "one" "hello, world"))
443 (two (gexp->derivation "two"
444 #~(symlink #$one #$output:chbouib)))
445 (drv (gexp->derivation "ref-graphs"
446 #~(begin
447 (use-modules (guix build store-copy))
448 (with-output-to-file #$output
449 (lambda ()
450 (write (call-with-input-file "guile"
451 read-reference-graph))))
452 (with-output-to-file #$output:one
453 (lambda ()
454 (write (call-with-input-file "one"
455 read-reference-graph))))
456 (with-output-to-file #$output:two
457 (lambda ()
458 (write (call-with-input-file "two"
459 read-reference-graph)))))
460 #:references-graphs `(("one" ,one)
461 ("two" ,two "chbouib")
462 ("guile" ,%bootstrap-guile))
463 #:modules '((guix build store-copy)
464 (guix build utils))))
465 (ok? (built-derivations (list drv)))
466 (guile-drv (package->derivation %bootstrap-guile))
467 (g-one -> (derivation->output-path drv "one"))
468 (g-two -> (derivation->output-path drv "two"))
469 (g-guile -> (derivation->output-path drv)))
470 (return (and ok?
471 (equal? (call-with-input-file g-one read) (list one))
472 (equal? (call-with-input-file g-two read)
473 (list one (derivation->output-path two "chbouib")))
474 (equal? (call-with-input-file g-guile read)
475 (list (derivation->output-path guile-drv)))))))
476
c8351d9a
LC
477(test-assertm "gexp->derivation #:allowed-references"
478 (mlet %store-monad ((drv (gexp->derivation "allowed-refs"
479 #~(begin
480 (mkdir #$output)
481 (chdir #$output)
482 (symlink #$output "self")
483 (symlink #$%bootstrap-guile
484 "guile"))
485 #:allowed-references
486 (list "out" %bootstrap-guile))))
487 (built-derivations (list drv))))
488
489(test-assert "gexp->derivation #:allowed-references, disallowed"
490 (let ((drv (run-with-store %store
491 (gexp->derivation "allowed-refs"
492 #~(begin
493 (mkdir #$output)
494 (chdir #$output)
495 (symlink #$%bootstrap-guile "guile"))
496 #:allowed-references '()))))
497 (guard (c ((nix-protocol-error? c) #t))
498 (build-derivations %store (list drv))
499 #f)))
500
c17b5ab4 501(define shebang
c1bc358f 502 (string-append "#!" (derivation->output-path (%guile-for-build))
c17b5ab4
LC
503 "/bin/guile --no-auto-compile"))
504
505;; If we're going to hit the silly shebang limit (128 chars on Linux-based
506;; systems), then skip the following test.
507(test-skip (if (> (string-length shebang) 127) 1 0))
508
21b679f6
LC
509(test-assertm "gexp->script"
510 (mlet* %store-monad ((n -> (random (expt 2 50)))
511 (exp -> (gexp
512 (system*
513 (string-append (ungexp %bootstrap-guile)
514 "/bin/guile")
515 "-c" (object->string
516 '(display (expt (ungexp n) 2))))))
517 (drv (gexp->script "guile-thing" exp
518 #:guile %bootstrap-guile))
519 (out -> (derivation->output-path drv))
520 (done (built-derivations (list drv))))
521 (let* ((pipe (open-input-pipe out))
522 (str (get-string-all pipe)))
523 (return (and (zero? (close-pipe pipe))
524 (= (expt n 2) (string->number str)))))))
525
462a3fa3
LC
526(test-assert "text-file*"
527 (let ((references (store-lift references)))
528 (run-with-store %store
529 (mlet* %store-monad
530 ((drv (package->derivation %bootstrap-guile))
531 (guile -> (derivation->output-path drv))
532 (file (text-file "bar" "This is bar."))
533 (text (text-file* "foo"
534 %bootstrap-guile "/bin/guile "
535 `(,%bootstrap-guile "out") "/bin/guile "
536 drv "/bin/guile "
537 file))
538 (done (built-derivations (list text)))
539 (out -> (derivation->output-path text))
540 (refs (references out)))
541 ;; Make sure we get the right references and the right content.
542 (return (and (lset= string=? refs (list guile file))
543 (equal? (call-with-input-file out get-string-all)
544 (string-append guile "/bin/guile "
545 guile "/bin/guile "
546 guile "/bin/guile "
547 file)))))
548 #:guile-for-build (package-derivation %store %bootstrap-guile))))
549
2cf0ea0d
LC
550(test-assert "printer"
551 (string-match "^#<gexp \\(string-append .*#<package coreutils.*\
552 \"/bin/uname\"\\) [[:xdigit:]]+>$"
553 (with-output-to-string
554 (lambda ()
555 (write
556 (gexp (string-append (ungexp coreutils)
557 "/bin/uname")))))))
558
559(test-assert "printer vs. ungexp-splicing"
560 (string-match "^#<gexp .* [[:xdigit:]]+>$"
561 (with-output-to-string
562 (lambda ()
563 ;; #~(begin #$@#~())
564 (write
565 (gexp (begin (ungexp-splicing (gexp ())))))))))
566
21b679f6
LC
567(test-equal "sugar"
568 '(gexp (foo (ungexp bar) (ungexp baz "out")
569 (ungexp (chbouib 42))
667b2508
LC
570 (ungexp-splicing (list x y z))
571 (ungexp-native foo) (ungexp-native foo "out")
572 (ungexp-native (chbouib 42))
573 (ungexp-native-splicing (list x y z))))
574 '#~(foo #$bar #$baz:out #$(chbouib 42) #$@(list x y z)
575 #+foo #+foo:out #+(chbouib 42) #+@(list x y z)))
21b679f6
LC
576
577(test-end "gexp")
578
579\f
580(exit (= (test-runner-fail-count (test-runner-current)) 0))
581
582;; Local Variables:
583;; eval: (put 'test-assertm 'scheme-indent-function 1)
584;; End: