mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
while in terms of syntax-case
* module/ice-9/boot-9.scm (while): Reimplement in terms of syntax-case. Prompt inlining is coming later. * test-suite/tests/syntax.test ("while"): Update the expected syntax errors.
This commit is contained in:
parent
322a36ce9f
commit
10e69149f6
2 changed files with 46 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
|||
;;;; syntax.test --- test suite for Guile's syntactic forms -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright (C) 2001,2003,2004, 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2001,2003,2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -75,6 +75,9 @@
|
|||
(define exception:bad-cond-clause
|
||||
(cons 'syntax-error "Bad cond clause"))
|
||||
|
||||
(define exception:too-many-args
|
||||
(cons 'syntax-error "too many arguments"))
|
||||
|
||||
|
||||
(with-test-prefix "expressions"
|
||||
|
||||
|
@ -832,7 +835,7 @@
|
|||
#t))))
|
||||
|
||||
|
||||
(pass-if-exception "too few args" exception:wrong-num-args
|
||||
(pass-if-exception "too few args" exception:generic-syncase-error
|
||||
(eval '(while) (interaction-environment)))
|
||||
|
||||
(with-test-prefix "empty body"
|
||||
|
@ -872,7 +875,7 @@
|
|||
|
||||
(with-test-prefix "break"
|
||||
|
||||
(pass-if-exception "too many args" exception:wrong-num-args
|
||||
(pass-if-exception "too many args" exception:too-many-args
|
||||
(eval '(while #t
|
||||
(break 1))
|
||||
(interaction-environment)))
|
||||
|
@ -945,7 +948,7 @@
|
|||
|
||||
(with-test-prefix "continue"
|
||||
|
||||
(pass-if-exception "too many args" exception:wrong-num-args
|
||||
(pass-if-exception "too many args" exception:too-many-args
|
||||
(eval '(while #t
|
||||
(continue 1))
|
||||
(interaction-environment)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue