X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Flist.pure.lisp;h=b1f588ea4efded356f53c5d5c0a1291695409654;hb=b86f43bae31f775d834c724e21f0f573b968f695;hp=3a2894c9f75eb57a89a8790bfcf840dc56a5794c;hpb=5f492c8a8eea8a407d82de104e16b7148a7f9eb8;p=sbcl.git diff --git a/tests/list.pure.lisp b/tests/list.pure.lisp index 3a2894c..b1f588e 100644 --- a/tests/list.pure.lisp +++ b/tests/list.pure.lisp @@ -124,3 +124,15 @@ (assert (eq (nth (* 1440 most-positive-fixnum) s) 'c)) (setf (nth (* 1440 most-positive-fixnum) s) 14) (assert (eq (nth (* 1440 most-positive-fixnum) s) 14))) + +(let ((s (copy-list '(1 2 3)))) + (assert (eq s (last s (* 1440 most-positive-fixnum)))) + (assert (null (butlast s (* 1440 most-positive-fixnum)))) + (assert (null (nbutlast s (* 1440 most-positive-fixnum))))) + +;;; Bug reported by Paul Dietz: ASSOC should ignore NIL elements in a +;;; alist +(let ((f (compile nil '(lambda (x) + (assoc x '(nil (a . b) nil (nil . c) (c . d)) + :test #'eq))))) + (assert (equal (funcall f 'nil) '(nil . c))))