113 |
(concatenate 'null nil nil) |
(concatenate 'null nil nil) |
114 |
nil) |
nil) |
115 |
|
|
116 |
|
;;; Tests on vectors with fill pointers |
117 |
|
|
118 |
|
(deftest concatenate.25 |
119 |
|
(let ((x (make-array '(10) :initial-contents '(a b c d e f g h i j) |
120 |
|
:fill-pointer 5))) |
121 |
|
(concatenate 'list x x)) |
122 |
|
(a b c d e a b c d e)) |
123 |
|
|
124 |
|
(deftest concatenate.26 |
125 |
|
(let ((x (make-array '(10) :initial-contents '(a b c d e f g h i j) |
126 |
|
:fill-pointer 5))) |
127 |
|
(concatenate 'list x)) |
128 |
|
(a b c d e)) |
129 |
|
|
130 |
|
(deftest concatenate.27 |
131 |
|
(let* ((x (make-array '(10) :initial-contents '(a b c d e f g h i j) |
132 |
|
:fill-pointer 5)) |
133 |
|
(result (concatenate 'vector x))) |
134 |
|
(values (not (simple-vector-p result)) |
135 |
|
result)) |
136 |
|
nil |
137 |
|
#(a b c d e)) |
138 |
|
|
139 |
|
(deftest concatenate.28 |
140 |
|
(let* ((x (make-array '(10) :initial-contents (coerce "abcdefghij" 'list) |
141 |
|
:fill-pointer 5 :element-type 'character))) |
142 |
|
(values |
143 |
|
(concatenate 'string x '(#\z)) |
144 |
|
(concatenate 'string '(#\z) x) |
145 |
|
(concatenate 'string x x) |
146 |
|
(concatenate 'string x) |
147 |
|
(not (simple-string-p (concatenate 'string x))) |
148 |
|
)) |
149 |
|
"abcdez" |
150 |
|
"zabcde" |
151 |
|
"abcdeabcde" |
152 |
|
"abcde" |
153 |
|
nil) |
154 |
|
|
155 |
|
(deftest concatenate.29 |
156 |
|
(let* ((x (make-array '(10) :initial-contents (coerce "abcdefghij" 'list) |
157 |
|
:fill-pointer 5 :element-type 'base-char))) |
158 |
|
(values |
159 |
|
(concatenate 'string x '(#\z)) |
160 |
|
(concatenate 'string '(#\z) x) |
161 |
|
(concatenate 'string x x) |
162 |
|
(concatenate 'string x) |
163 |
|
(not (simple-string-p (concatenate 'string x))) |
164 |
|
)) |
165 |
|
"abcdez" |
166 |
|
"zabcde" |
167 |
|
"abcdeabcde" |
168 |
|
"abcde" |
169 |
|
nil) |
170 |
|
|
171 |
|
(deftest concatenate.30 |
172 |
|
(let* ((x (make-array '(10) :initial-contents (coerce #*0110010111 'list) |
173 |
|
:fill-pointer 5 :element-type 'bit))) |
174 |
|
(values |
175 |
|
(concatenate 'bit-vector x '(0)) |
176 |
|
(concatenate 'bit-vector '(0) x) |
177 |
|
(concatenate 'bit-vector x x) |
178 |
|
(concatenate 'bit-vector x) |
179 |
|
(not (simple-bit-vector-p (concatenate 'bit-vector x))) |
180 |
|
)) |
181 |
|
#*011000 |
182 |
|
#*001100 |
183 |
|
#*0110001100 |
184 |
|
#*01100 |
185 |
|
nil) |
186 |
|
|
187 |
;;; Error tests |
;;; Error tests |
188 |
|
|
189 |
(deftest concatenate-error.1 |
(deftest concatenate-error.1 |