; -*- Scheme -*-
;
; $Id: stringt08.scm,v 1.1 1998/03/16 08:00:06 foner Exp $

(require 'substring:replicate)

(define substring:test:replicate
  (lambda ()

    (string:test:equal
      'substring:test:replicate-a
      (substring:replicate "abc" 0 3 10)
      "abcabcabca")

    (string:test:equal
      'substring:test:replicate-b
      (substring:replicate "abc" 0 3 1)
      "a")

    (string:test:equal
      'substring:test:replicate-c
      (substring:replicate "abc" 0 3 0)
      "")

    (string:test:equal
      'substring:test:replicate-d
      (substring:replicate "" 0 0 1)
      "")

    ))

(define string:test:replicate
  (lambda ()

    (string:test:equal
      'string:test:replicate-a
      (string:replicate "abc" 10)
      "abcabcabca")

    (string:test:equal
      'string:test:replicate-b
      (string:replicate "abc" 1)
      "a")

    (string:test:equal
      'string:test:replicate-c
      (string:replicate "abc" 0)
      "")

    (string:test:equal
      'string:test:replicate-d
      (string:replicate "" 1)
      "")

    ))

; eof
