244 |
result) |
result) |
245 |
#(a b z c b)) |
#(a b z c b)) |
246 |
|
|
247 |
|
(deftest nsubstitute-if-not-vector.32 |
248 |
|
(let* ((v1 (copy-seq #(a b c d a b c d a b c d a b c d))) |
249 |
|
(v2 (make-array '(8) :displaced-to v1 |
250 |
|
:displaced-index-offset 3))) |
251 |
|
(nsubstitute-if-not 'x (is-not-eql-p 'c) v2 :count 1)) |
252 |
|
#(d a b x d a b c)) |
253 |
|
|
254 |
|
(deftest nsubstitute-if-not-vector.33 |
255 |
|
(let* ((v1 (copy-seq #(a b c d a b c d a b c d a b c d))) |
256 |
|
(v2 (make-array '(8) :displaced-to v1 |
257 |
|
:displaced-index-offset 3))) |
258 |
|
(nsubstitute-if-not 'x (is-not-eql-p 'c) v2 :count 1 :from-end t)) |
259 |
|
#(d a b c d a b x)) |
260 |
|
|
261 |
;;; Tests on strings |
;;; Tests on strings |
262 |
|
|
263 |
(deftest nsubstitute-if-not-string.1 |
(deftest nsubstitute-if-not-string.1 |
395 |
result) |
result) |
396 |
"abzcb") |
"abzcb") |
397 |
|
|
398 |
|
(deftest nsubstitute-if-not-string.32 |
399 |
|
(do-special-strings |
400 |
|
(s "xyzabcxyzabc" nil) |
401 |
|
(assert (string= (nsubstitute-if-not #\! (is-not-eql-p #\a) s) "xyz!bcxyz!bc"))) |
402 |
|
nil) |
403 |
|
|
404 |
|
(deftest nsubstitute-if-not-string.33 |
405 |
|
(do-special-strings |
406 |
|
(s "xyzabcxyzabc" nil) |
407 |
|
(assert (string= (nsubstitute-if-not #\! (is-not-eql-p #\a) s :count 1) "xyz!bcxyzabc"))) |
408 |
|
nil) |
409 |
|
|
410 |
|
(deftest nsubstitute-if-not-string.34 |
411 |
|
(do-special-strings |
412 |
|
(s "xyzabcxyzabc" nil) |
413 |
|
(assert (string= (nsubstitute-if-not #\! (is-not-eql-p #\a) s :count 1 :from-end t) "xyzabcxyz!bc"))) |
414 |
|
nil) |
415 |
|
|
416 |
|
|
417 |
;;; Tests on bit-vectors |
;;; Tests on bit-vectors |
418 |
|
|