1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-06 20:20:20 +02:00

add syncase test

* test-suite/tests/syncase.test ("top-level expansions"): New test.
This commit is contained in:
Andy Wingo 2011-02-27 12:58:54 +01:00
parent 4da326f25d
commit fa3df855e8

View file

@ -1,6 +1,6 @@
;;;; syncase.test --- test suite for (ice-9 syncase) -*- scheme -*- ;;;; syncase.test --- test suite for (ice-9 syncase) -*- scheme -*-
;;;; ;;;;
;;;; Copyright (C) 2001, 2006, 2009, 2010 Free Software Foundation, Inc. ;;;; Copyright (C) 2001, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public ;;;; modify it under the terms of the GNU Lesser General Public
@ -220,3 +220,15 @@
(set! baz 50) (set! baz 50)
(equal? (+ baz qux) (equal? (+ baz qux)
100))))) 100)))))
(with-test-prefix "top-level expansions"
(pass-if "syntax definitions expanded before other expressions"
(eval '(begin
(define even?
(lambda (x)
(or (= x 0) (odd? (- x 1)))))
(define-syntax odd?
(syntax-rules ()
((odd? x) (not (even? x)))))
(even? 10))
(current-module))))