diff options
author | Andreas Rottmann <a.rottmann@gmx.at> | 2009-11-14 17:25:12 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-11-14 17:25:12 +0100 |
commit | cb65f76c7408569d72ed82b77a154acd79d29c69 (patch) | |
tree | e2bbee338ecac322dca2f6ded46731a82ba720cb /test-suite/tests/syncase.test | |
parent | d89fae24f516ed4aaadae531bef98de8d524b9f9 (diff) | |
download | guile-cb65f76c7408569d72ed82b77a154acd79d29c69.tar.gz |
add quasisyntax
* module/Makefile.am:
* module/ice-9/boot-9.scm:
* module/ice-9/quasisyntax.scm: Add quasisyntax. Implementation by Andre
van Tonder, patch by Andreas Rottmann.
* test-suite/tests/srfi-10.test: Hack to remove srfi-10's clobbering of
#,.
* test-suite/tests/syncase.test: Add a quasisyntax test.
Diffstat (limited to 'test-suite/tests/syncase.test')
-rw-r--r-- | test-suite/tests/syncase.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test-suite/tests/syncase.test b/test-suite/tests/syncase.test index 72acdeccb..af9f6f318 100644 --- a/test-suite/tests/syncase.test +++ b/test-suite/tests/syncase.test @@ -1,6 +1,6 @@ ;;;; syncase.test --- test suite for (ice-9 syncase) -*- scheme -*- ;;;; -;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. +;;;; Copyright (C) 2001, 2006, 2009 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 @@ -31,3 +31,15 @@ (pass-if "@ works with syncase" (eq? run-test (@ (test-suite lib) run-test))) + +(define-syntax string-let + (lambda (stx) + (syntax-case stx () + ((_ id body ...) + #`(let ((id #,(symbol->string + (syntax->datum #'id)))) + body ...))))) + +(pass-if "macro using quasisyntax" + (equal? (string-let foo (list foo foo)) + '("foo" "foo"))) |