diff --git a/tests/let-syntax.scm b/tests/let-syntax.scm index d079c2a0..69af2d17 100644 --- a/tests/let-syntax.scm +++ b/tests/let-syntax.scm @@ -1,4 +1,4 @@ -(import (scheme base)) +(import (scheme base) (scheme write)) ;; (let-syntax ((given-that (syntax-rules () ;; ((given-that test stmt1 stmt2 ...) @@ -9,7 +9,17 @@ ;; (given-that if (set! if 'now)) ;; if)) ;; => now +;;(let ((x 'outer)) +;; (let-syntax ((m (syntax-rules () ((m) x)))) +;; (let ((x 'inner)) +;; (m)))) ;; Should be outer + +(write (let ((x 'outer)) - (let-syntax ((m (syntax-rules () ((m) x)))) + (define-syntax m ;; Testing this out, but let-syntax needs to work, too + (syntax-rules () ((m) x))) (let ((x 'inner)) - (m)))) ;; Should be outer + (m))) ;; Should be outer + ) + +(write (m)) ;; Should be an error, of course