161 |
|
|
162 |
;; Check that a NIL :key argument is the same as no key argument at all |
;; Check that a NIL :key argument is the same as no key argument at all |
163 |
(deftest pushnew-10 |
(deftest pushnew-10 |
164 |
(handler-case |
(let* ((x (list 'a 'b 'c 'd)) |
165 |
(let* ((x (list 'a 'b 'c 'd)) |
(result (pushnew 'z x :key nil))) |
166 |
(result (pushnew 'z x :key nil))) |
result) |
|
result) |
|
|
(error (c) c)) |
|
167 |
(z a b c d)) |
(z a b c d)) |
168 |
|
|
169 |
;; Check that a NIL :key argument is the same as no key argument at all |
;; Check that a NIL :key argument is the same as no key argument at all |
170 |
(deftest pushnew-11 |
(deftest pushnew-11 |
171 |
(handler-case |
(let* ((x (copy-tree '((a b) 1 "and" c d e))) |
172 |
(let* ((x (copy-tree '((a b) 1 "and" c d e))) |
(y (pushnew (copy-tree '(a b)) x |
173 |
(y (pushnew (copy-tree '(a b)) x |
:test 'equal :key nil))) |
174 |
:test 'equal :key nil))) |
(and |
175 |
(and |
(eqt x y) |
176 |
(eqt x y) |
x)) |
|
x)) |
|
|
(error (c) c)) |
|
177 |
((a b) 1 "and" c d e)) |
((a b) 1 "and" c d e)) |
178 |
|
|
179 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
193 |
|
|
194 |
;; Check that a NIL :key argument is the same as no key argument at all |
;; Check that a NIL :key argument is the same as no key argument at all |
195 |
(deftest adjoin-4 |
(deftest adjoin-4 |
196 |
(handler-case |
(adjoin 'a '(a) :key nil) |
|
(adjoin 'a '(a) :key nil) |
|
|
(error (c) c)) |
|
197 |
(a)) |
(a)) |
198 |
|
|
199 |
(deftest adjoin-5 |
(deftest adjoin-5 |
242 |
|
|
243 |
;; Test that a :key of NIL is the same as no key at all |
;; Test that a :key of NIL is the same as no key at all |
244 |
(deftest adjoin-16 |
(deftest adjoin-16 |
245 |
(handler-case |
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) |
246 |
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) |
:test #'equal :key nil) |
247 |
:test #'equal :key nil) |
(aaa "AAA" "aaa" #\a)) |
|
(error (c) c)) |
|
|
(aaa "AAA" "aaa" #\a)) |
|
248 |
|
|
249 |
;; Test that a :key of NIL is the same as no key at all |
;; Test that a :key of NIL is the same as no key at all |
250 |
(deftest adjoin-17 |
(deftest adjoin-17 |
251 |
(handler-case |
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) |
252 |
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) |
:test 'equal :key nil) |
253 |
:test 'equal :key nil) |
(aaa "AAA" "aaa" #\a)) |
|
(error (c) c)) |
|
|
(aaa "AAA" "aaa" #\a)) |
|
254 |
|
|
255 |
;; Test that a :key of NIL is the same as no key at all |
;; Test that a :key of NIL is the same as no key at all |
256 |
(deftest adjoin-18 |
(deftest adjoin-18 |
257 |
(handler-case |
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) |
258 |
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) |
:test-not (complement #'equal) :key nil) |
259 |
:test-not (complement #'equal) :key nil) |
(aaa "AAA" "aaa" #\a)) |
|
(error (c) c)) |
|
|
(aaa "AAA" "aaa" #\a)) |
|