Commit bcc99a97 authored by pfdietz's avatar pfdietz

Added tests for STRING-TRIM.

parent 30d5e5d8
......@@ -121,3 +121,4 @@
(load "nstring-upcase.lsp")
(load "nstring-downcase.lsp")
(load "nstring-capitalize.lsp")
(load "string-trim.lsp")
\ No newline at end of file
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Thu Oct 3 21:53:38 2002
;;;; Contains: Tests for STRING-TRIM
(in-package :cl-test)
(deftest string-trim.1
(let* ((s (copy-seq "abcdaba"))
(s2 (string-trim "ab" s)))
(values s s2))
"abcdaba"
"cd")
(deftest string-trim.2
(let* ((s (copy-seq "abcdaba"))
(s2 (string-trim '(#\a #\b) s)))
(values s s2))
"abcdaba"
"cd")
(deftest string-trim.3
(let* ((s (copy-seq "abcdaba"))
(s2 (string-trim #(#\a #\b) s)))
(values s s2))
"abcdaba"
"cd")
(deftest string-trim.4
(let* ((s (copy-seq "abcdaba"))
(s2 (string-trim (make-array 2 :initial-contents '(#\a #\b))
s)))
(values s s2))
"abcdaba"
"cd")
(deftest string-trim.5
(let* ((s (copy-seq "abcdaba"))
(s2 (string-trim (make-array 2 :initial-contents '(#\a #\b)
:element-type 'character)
s)))
(values s s2))
"abcdaba"
"cd")
(deftest string-trim.6
(let* ((s (copy-seq "abcdaba"))
(s2 (string-trim (make-array 2 :initial-contents '(#\a #\b)
:element-type 'standard-char)
s)))
(values s s2))
"abcdaba"
"cd")
(deftest string-trim.7
(let* ((s (copy-seq "abcdaba"))
(s2 (string-trim (make-array 2 :initial-contents '(#\a #\b)
:element-type 'base-char)
s)))
(values s s2))
"abcdaba"
"cd")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment