X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fseq.lisp;h=6538f21b979556e332422df5e33e6340341916a7;hb=dbd7f3f4c890a8f809a9ce35b58b1d662df6c2aa;hp=a780b1b07f95053f5e86a1e0d211a331f4a08506;hpb=4d757501022f957f4408c344c4cb895ffd073de6;p=jscl.git 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))