From dbd7f3f4c890a8f809a9ce35b58b1d662df6c2aa Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Mon, 10 Jun 2013 21:18:09 +0200 Subject: [PATCH] Add SEARCH, MISMATCH testcases. --- tests/seq.lisp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/seq.lisp b/tests/seq.lisp index a780b1b..6538f21 100644 --- a/tests/seq.lisp +++ b/tests/seq.lisp @@ -77,3 +77,18 @@ (test (equal (reduce #'+ '(100) :key #'1+) 101)) + +; MISMATCH +(test (= (mismatch '(1 2 3) '(1 2 3 4 5 6)) 3)) +(test (= (mismatch '(1 2 3) #(1 2 3 4 5 6)) 3)) +(test (= (mismatch #(1 2 3) '(1 2 3 4 5 6)) 3)) +(test (= (mismatch #(1 2 3) #(1 2 3 4 5 6)) 3)) + +; SEARCH +(test (= (search '(1 2 3) '(4 5 6 1 2 3)) 3)) +(test (= (search '(1 2 3) #(4 5 6 1 2 3)) 3)) +(test (= (search #(1 2 3) '(4 5 6 1 2 3)) 3)) +(test (= (search #(1 2 3) #(4 5 6 1 2 3)) 3)) +(test (not (search '(foo) '(1 2 3)))) +(test (= (search '(1) '(4 5 6 1 2 3)) 3)) +(test (= (search #(1) #(4 5 6 1 2 3)) 3)) -- 1.7.10.4