Skip to content
Snippets Groups Projects
Commit c12ec395 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Fix strcat tests on ECL.

parent 039449d4
No related branches found
No related tags found
No related merge requests found
......@@ -210,14 +210,15 @@
(assert (base-string-p (make-string 10 :element-type 'character))))
(defun basify (s) (coerce s 'base-string))
(defun unbasify (s) (coerce s '(array character (*)))) ; on ECL, literals are base strings (!)
#+non-base-chars-exist-p
(progn
(assert (not (base-string-p (make-string 10 :element-type 'character))))
(assert (not (base-string-p "abc")))
(assert (not (base-string-p (unbasify "abc"))))
(assert (base-string-p (basify "abc")))
(assert (not (base-string-p (strcat "a" NIL #\b "cd"))))
(assert (not (base-string-p (strcat "a" NIL #\b (unbasify "cd")))))
(assert (base-string-p (reduce/strcat (mapcar 'basify '("a" "b" NIL "cd")))))
(assert (base-string-p (strcat (basify "ab") (basify "cd"))))
(assert (not (base-string-p (strcat (basify "ab") #\c "d"))))
(assert (not (base-string-p (strcat (basify "ab") #\c (unbasify "d")))))
(assert (base-string-p (strcat (basify "ab") #\c #\d))))
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