Skip to content
Snippets Groups Projects
Commit 3ea8aaa2 authored by pfdietz's avatar pfdietz
Browse files

Modified so that instead of using EQUALP, uses EQUALP-WITH-CASE (which is kind...

Modified so that instead of using EQUALP, uses EQUALP-WITH-CASE (which is kind of like EQUALP but preserves case in comparison of characters.)
parent c4401f9c
No related branches found
No related tags found
No related merge requests found
...@@ -101,6 +101,23 @@ ...@@ -101,6 +101,23 @@
(defun do-test (&optional (name *test*)) (defun do-test (&optional (name *test*))
(do-entry (get-entry name))) (do-entry (get-entry name)))
(defun equalp-with-case (x y)
(cond
((consp x)
(and (consp y)
(equalp-with-case (car x) (car y))
(equalp-with-case (cdr x) (cdr y))))
((typep x 'vector)
(and (typep y 'vector)
(let ((x-len (length x))
(y-len (length y)))
(and (eql x-len y-len)
(loop
for e1 across x
for e2 across y
always (equalp-with-case e1 e2))))))
(t (eql x y))))
(defun do-entry (entry &optional (defun do-entry (entry &optional
(s *standard-output*)) (s *standard-output*))
(catch '*in-test* (catch '*in-test*
...@@ -117,7 +134,7 @@ ...@@ -117,7 +134,7 @@
(declare (special *break-on-warnings*)) (declare (special *break-on-warnings*))
(setf (pend entry) (setf (pend entry)
(or aborted (or aborted
(not (equalp r (vals entry))))) (not (equalp-with-case r (vals entry)))))
(when (pend entry) (when (pend entry)
(format s "~&Test ~:@(~S~) failed~ (format s "~&Test ~:@(~S~) failed~
~%Form: ~S~ ~%Form: ~S~
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment