1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
;;;; $Id: test-binding-macro.lisp 161 2006-05-23 20:40:48Z ehuelsmann $
;;;; $URL: svn+ssh://ehuelsmann@common-lisp.net/project/cl-irc/svn/trunk/test/test-binding-macro.lisp $
;;;; See the LICENSE file for licensing information.
(in-package :cl-irc-test)
(defvar *protocol-mode*
":Chanserv!chanserve@services. MODE #svn +o eh")
;; tests which should complete successfully
(deftest binding.1
(destructuring-arguments
(target modes &rest arguments)
(cl-irc::create-irc-message *protocol-mode*)
(values target modes arguments))
"#svn" "+o" ("eh"))
(deftest binding.2
(destructuring-arguments
(target :ignored &rest arguments)
(cl-irc::create-irc-message *protocol-mode*)
(values target arguments))
"#svn" ("eh"))
(deftest binding.3
(destructuring-arguments
(:ignored &rest arguments &req nick)
(cl-irc::create-irc-message *protocol-mode*)
(values nick arguments))
"eh" ("+o"))
(deftest binding.4
(destructuring-arguments
(target &optional modes &req nick)
(cl-irc::create-irc-message *protocol-mode*)
(values target modes nick))
"#svn" "+o" "eh")
(deftest binding.5
(destructuring-arguments
(&whole all target &optional modes &req nick)
(cl-irc::create-irc-message *protocol-mode*)
(values all target modes nick))
("#svn" "+o" "eh") "#svn" "+o" "eh")
(deftest binding.6
(destructuring-arguments
(target &optional modes &rest args &req nick)
(cl-irc::create-irc-message *protocol-mode*)
(values target modes args nick))
"#svn" "+o" nil "eh")
|