1.0.29.5: list item seek transform needs to check for both :TEST and :TEST-NOT
[sbcl.git] / tests / seq.impure.lisp
index ddc416d..ffb1ec7 100644 (file)
 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
 ;;;; more information.
 
+(load "test-util.lisp")
 (load "assertoid.lisp")
 
 (defpackage :seq-test
-  (:use :cl :assertoid))
+  (:use :cl :assertoid :test-util))
 
 (in-package :seq-test)
 
   (assert (raises-error? (fill l 0 :start 4)))
   (assert (raises-error? (fill l 0 :end 4)))
   (assert (raises-error? (fill l 0 :start 2 :end 1))))
+
+;;; Both :TEST and :TEST-NOT provided
+(with-test (:name :test-and-test-not-to-adjoin)
+  (let* ((wc 0)
+         (fun
+          (handler-bind (((and warning (not style-warning))
+                          (lambda (w) (incf wc))))
+            (compile nil `(lambda (item test test-not) (adjoin item '(1 2 3 :foo)
+                                                               :test test
+                                                               :test-not test-not))))))
+    (assert (= 1 wc))
+    (assert (eq :error
+                (handler-case
+                    (funcall fun 1 #'eql (complement #'eql))
+                  (error ()
+                    :error))))))
 \f
 ;;; success