Last change
on this file was
161,
checked in by Erik Huelsmann, 18 years ago
|
Replace destructuring-arguments with a hopefully more useful version.
Including tests.
Raising specific errors has been raised as its own issue #22.
|
-
Property svn:keywords set to
Id URL
|
File size:
1.4 KB
|
Line | |
---|
1 | ;;;; $Id: test-binding-macro.lisp 161 2006-05-23 20:40:48Z ehuelsmann $ |
---|
2 | ;;;; $URL: tags/0.9.1/test/test-binding-macro.lisp $ |
---|
3 | |
---|
4 | ;;;; See the LICENSE file for licensing information. |
---|
5 | |
---|
6 | |
---|
7 | (in-package :cl-irc-test) |
---|
8 | |
---|
9 | (defvar *protocol-mode* |
---|
10 | ":Chanserv!chanserve@services. MODE #svn +o eh") |
---|
11 | |
---|
12 | |
---|
13 | ;; tests which should complete successfully |
---|
14 | |
---|
15 | (deftest binding.1 |
---|
16 | (destructuring-arguments |
---|
17 | (target modes &rest arguments) |
---|
18 | (cl-irc::create-irc-message *protocol-mode*) |
---|
19 | (values target modes arguments)) |
---|
20 | "#svn" "+o" ("eh")) |
---|
21 | |
---|
22 | |
---|
23 | (deftest binding.2 |
---|
24 | (destructuring-arguments |
---|
25 | (target :ignored &rest arguments) |
---|
26 | (cl-irc::create-irc-message *protocol-mode*) |
---|
27 | (values target arguments)) |
---|
28 | "#svn" ("eh")) |
---|
29 | |
---|
30 | (deftest binding.3 |
---|
31 | (destructuring-arguments |
---|
32 | (:ignored &rest arguments &req nick) |
---|
33 | (cl-irc::create-irc-message *protocol-mode*) |
---|
34 | (values nick arguments)) |
---|
35 | "eh" ("+o")) |
---|
36 | |
---|
37 | (deftest binding.4 |
---|
38 | (destructuring-arguments |
---|
39 | (target &optional modes &req nick) |
---|
40 | (cl-irc::create-irc-message *protocol-mode*) |
---|
41 | (values target modes nick)) |
---|
42 | "#svn" "+o" "eh") |
---|
43 | |
---|
44 | (deftest binding.5 |
---|
45 | (destructuring-arguments |
---|
46 | (&whole all target &optional modes &req nick) |
---|
47 | (cl-irc::create-irc-message *protocol-mode*) |
---|
48 | (values all target modes nick)) |
---|
49 | ("#svn" "+o" "eh") "#svn" "+o" "eh") |
---|
50 | |
---|
51 | (deftest binding.6 |
---|
52 | (destructuring-arguments |
---|
53 | (target &optional modes &rest args &req nick) |
---|
54 | (cl-irc::create-irc-message *protocol-mode*) |
---|
55 | (values target modes args nick)) |
---|
56 | "#svn" "+o" nil "eh") |
---|
Note: See
TracBrowser
for help on using the repository browser.