18 |
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, |
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, |
19 |
;;;; Boston, MA 02111-1307 USA |
;;;; Boston, MA 02111-1307 USA |
20 |
|
|
21 |
(use-modules (test-suite lib) |
(define-module (test-suite test-optargs) |
22 |
(ice-9 optargs)) |
:use-module (test-suite lib) |
23 |
|
:use-module (ice-9 optargs)) |
24 |
|
|
25 |
(with-test-prefix "optional argument processing" |
(with-test-prefix "optional argument processing" |
|
(define* (test-1 #:optional (x 0)) |
|
|
(define d 1) ; local define |
|
|
#t) |
|
26 |
(pass-if "local defines work with optional arguments" |
(pass-if "local defines work with optional arguments" |
27 |
(false-if-exception (test-1)))) |
(eval '(begin |
28 |
|
(define* (test-1 #:optional (x 0)) |
29 |
|
(define d 1) ; local define |
30 |
|
#t) |
31 |
|
(false-if-exception (test-1))) |
32 |
|
(interaction-environment)))) |