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

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

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

revision 1.10 by pfdietz, Sat Jan 17 22:34:46 2004 UTC revision 1.11 by pfdietz, Thu Sep 23 13:28:54 2004 UTC
# Line 435  Line 435 
435      result)      result)
436    #(a b z c b))    #(a b z c b))
437    
438    (deftest substitute-vector.32
439      (let* ((v1 (copy-seq #(a b c d a b c d a b c d a b c d)))
440             (v2 (make-array '(8) :displaced-to v1
441                             :displaced-index-offset 3)))
442        (values
443         (substitute 'x 'c v2 :count 1)
444         v1))
445      #(d a b x d a b c)
446      #(a b c d a b c d a b c d a b c d))
447    
448    (deftest substitute-vector.33
449      (let* ((v1 (copy-seq #(a b c d a b c d a b c d a b c d)))
450             (v2 (make-array '(8) :displaced-to v1
451                             :displaced-index-offset 3)))
452        (values
453         (substitute 'x 'c v2 :count 1 :from-end t)
454         v1))
455      #(d a b c d a b x)
456      #(a b c d a b c d a b c d a b c d))
457    
458  ;;; Tests on strings  ;;; Tests on strings
459    
460  (deftest substitute-string.1  (deftest substitute-string.1
# Line 682  Line 702 
702      result)      result)
703    "abzcb")    "abzcb")
704    
705    (deftest substitute-string.32
706      (do-special-strings
707       (s "xyzabcxyzabc" nil)
708       (assert (string= (substitute #\! #\a s) "xyz!bcxyz!bc"))
709       (assert (string= (substitute #\! #\a s :count 1) "xyz!bcxyzabc"))
710       (assert (string= (substitute #\! #\a s :count 1 :from-end t) "xyzabcxyz!bc"))
711       (assert (string= s "xyzabcxyzabc")))
712      nil)
713    
714  ;;; Tests on bit-vectors  ;;; Tests on bit-vectors
715    
716  (deftest substitute-bit-vector.1  (deftest substitute-bit-vector.1

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

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