Commit dd5607a2 authored by Philipp Marek's avatar Philipp Marek

ALEXANDRIA-2 activated in ASDF, and added tests.

parent c4b10d9f
......@@ -14,7 +14,7 @@ The second return value is an alist of the removed items, in unspecified order."
(if (member key keys :test #'eq)
;; skip over this pair
(let ((next (cdr rest)))
(push (cons key rest)
(push (cons key (car rest))
(if tail
(setf (cdr tail) next)
......@@ -3,8 +3,7 @@
(:use :cl :alexandria.1.0.0)
(:lock t)
(:export .
#. (let (res) (do-external-symbols (sym :alexandria.1.0.0) (push sym res)) res)
. #. (let (res) (do-external-symbols (sym :alexandria.1.0.0) (push sym res)) res)
......@@ -7,24 +7,15 @@
(in-package :alexandria2-tests)
(deftest delete-from-plist*.1
(let ((orig '(a 1 b 2 c 3 d 4 d 5)))
(list (m-v-l(delete-from-plist* (copy-list orig) 'a 'c)
(m-v-l(delete-from-plist* (copy-list orig) 'b 'd)
(m-v-l(delete-from-plist* (copy-list orig) 'b)
(m-v-l(delete-from-plist* (copy-list orig) 'a)
(m-v-l(delete-from-plist* (copy-list orig) 'd 42 "zot")
(m-v-l(delete-from-plist* (copy-list orig) 'a 'b 'c 'd)
(m-v-l(delete-from-plist* (copy-list orig) 'a 'b 'c 'd 'x)
(equal orig (delete-from-plist orig))
(eq orig (delete-from-plist orig))))
(deftest delete-from-plist*.middle
(let ((input (list 'a 1 'b 2 'c 3 'd 4 'd 5)))
(multiple-value-list (delete-from-plist* input 'b 'c)))
((a 1 d 4 d 5)
((c . 3) (b . 2))))
(deftest delete-from-plist*.start
(let ((input (list 'a 1 'b 2 'c 3 'd 4 'd 5)))
(multiple-value-list (delete-from-plist* input 'a 'c)))
((b 2 d 4 d 5)
(a 1 c 3)
(a 1 c 3 d 4 d 5)
(b 2 c 3 d 4 d 5)
(a 1 b 2 c 3)
((c . 3) (a . 1))))
......@@ -59,5 +59,9 @@ the following constraints:
(:file "arrays" :depends-on ("package" "types"))
(:file "sequences" :depends-on ("package" "lists" "types"))
(:file "numbers" :depends-on ("package" "sequences"))
(:file "features" :depends-on ("package" "control-flow")))))
(:file "features" :depends-on ("package" "control-flow"))))
(:module "alexandria-2"
:components ((:static-file "tests.lisp")
(:file "package")
(:file "lists" :depends-on ("package")))))
:in-order-to ((test-op (test-op "alexandria-tests"))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment