Great, that did it. Thanks.

On Nov 8, 11:01 am, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Hi,
>
> session will be fully qualified. this is the default behavior.
> If you really want it, then you can treat it as the result of the
> unquoting of a value which resolves to a symbol.
>
> So you'll use ~ to say you want the value of .... (quote session)
> (quote session returns the symbol session when evaluated).
>
> that is, use ~'session instead of just session.
>
> HTH,
>
> --
> Laurent
>
> 2010/11/8 Miki <miki.teb...@gmail.com>:
>
> > Greetings,
>
> > I need some help with the 1'st macro I'm writing.
> > I have many tests in the format
>
> > (deftest user-test
> >  (let [session (test-session :authorization)]
> >    (dispatcher "USER bugs" session)
> >    (is (= (:user @session) "bugs"))
> >    (is (= (get-one session) "+OK Hello bugs\n"))))
>
> > I've tried writing
>
> > (defmacro def-dispatcher-test [test-name state command & body]
> >  `(deftest ~test-name
> >     (let [session (test-session ~state)]
> >       (dispatcher ~command session)
> >       ~...@body)))
>
> > (def-dispatcher-test user-test :authorization "USER bugs"
> >    (is (= (:user @session) "bugs"))
> >    (is (= (get-one session) "+OK Hello bugs\n")))
>
> > But I get the following error;
>
> > Caused by: java.lang.Exception: Can't let qualified name: pop32imap-
> > test/session
>
> > I probably need to add some magic to the session expansion, but can't
> > figure out what.
>
> > Thanks,
> > --
> > Miki
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to