/[gcl]/gcl/ansi-tests/substitute-if-not.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/substitute-if-not.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by pfdietz, Sat Jan 17 22:34:46 2004 UTC revision 1.10 by pfdietz, Thu Sep 23 13:28:54 2004 UTC
# Line 276  Line 276 
276      result)      result)
277    #(a b z c b))    #(a b z c b))
278    
279    (deftest substitute-if-not-vector.32
280      (let* ((v1 (copy-seq #(a b c d a b c d a b c d a b c d)))
281             (v2 (make-array '(8) :displaced-to v1
282                             :displaced-index-offset 3)))
283        (values
284         (substitute-if-not 'x (is-not-eql-p 'c) v2 :count 1)
285         v1))
286      #(d a b x d a b c)
287      #(a b c d a b c d a b c d a b c d))
288    
289    (deftest substitute-if-not-vector.33
290      (let* ((v1 (copy-seq #(a b c d a b c d a b c d a b c d)))
291             (v2 (make-array '(8) :displaced-to v1
292                             :displaced-index-offset 3)))
293        (values
294         (substitute-if-not 'x (is-not-eql-p 'c) v2 :count 1 :from-end t)
295         v1))
296      #(d a b c d a b x)
297      #(a b c d a b c d a b c d a b c d))
298    
299    
300    
301  ;;; Tests on strings  ;;; Tests on strings
302    
# Line 667  Line 688 
688           result))           result))
689    "01a2342015")    "01a2342015")
690    
691    (deftest substitute-if-not-string.26
692      (do-special-strings
693       (s "xyzabcxyzabc" nil)
694       (assert (string= (substitute-if-not #\! (is-not-eql-p #\a) s) "xyz!bcxyz!bc"))
695       (assert (string= (substitute-if-not #\! (is-not-eql-p #\a) s :count 1) "xyz!bcxyzabc"))
696       (assert (string= (substitute-if-not #\! (is-not-eql-p #\a) s :count 1 :from-end t) "xyzabcxyz!bc"))
697       (assert (string= s "xyzabcxyzabc")))
698      nil)
699    
700  (deftest substitute-if-not-bitstring.26  (deftest substitute-if-not-bitstring.26
701    (let* ((orig #*00111001011010110)    (let* ((orig #*00111001011010110)
702           (x (copy-seq orig))           (x (copy-seq orig))

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26