mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
(string-append/shared): New tests.
This commit is contained in:
parent
efeac8aed0
commit
8a8ca420b1
1 changed files with 44 additions and 0 deletions
|
@ -124,6 +124,50 @@
|
|||
(pass-if "more than one match, start and end index"
|
||||
(string-any char-upper-case? "abCDE" 1 4))))
|
||||
|
||||
;;;
|
||||
;;; string-append/shared
|
||||
;;;
|
||||
|
||||
(with-test-prefix "string-append/shared"
|
||||
|
||||
(pass-if "no args"
|
||||
(string=? "" (string-append/shared)))
|
||||
|
||||
(with-test-prefix "one arg"
|
||||
(pass-if "empty"
|
||||
(string=? "" (string-append/shared "")))
|
||||
(pass-if "non-empty"
|
||||
(string=? "xyz" (string-append/shared "xyz"))))
|
||||
|
||||
(with-test-prefix "two args"
|
||||
(pass-if (string=? "" (string-append/shared "" "")))
|
||||
(pass-if (string=? "xyz" (string-append/shared "xyz" "")))
|
||||
(pass-if (string=? "xyz" (string-append/shared "" "xyz")))
|
||||
(pass-if (string=? "abcxyz" (string-append/shared "abc" "xyz"))))
|
||||
|
||||
(with-test-prefix "three args"
|
||||
(pass-if (string=? "" (string-append/shared "" "" "")))
|
||||
(pass-if (string=? "xy" (string-append/shared "xy" "" "")))
|
||||
(pass-if (string=? "xy" (string-append/shared "" "xy" "")))
|
||||
(pass-if (string=? "abxy" (string-append/shared "ab" "xy" "")))
|
||||
(pass-if (string=? "ab" (string-append/shared "" "" "ab")))
|
||||
(pass-if (string=? "xyab" (string-append/shared "xy" "" "ab")))
|
||||
(pass-if (string=? "xyab" (string-append/shared "" "xy" "ab")))
|
||||
(pass-if (string=? "ghxyab" (string-append/shared "gh" "xy" "ab"))))
|
||||
|
||||
(with-test-prefix "four args"
|
||||
(pass-if (string=? "" (string-append/shared "" "" "" "")))
|
||||
(pass-if (string=? "xy" (string-append/shared "xy" "" "" "")))
|
||||
(pass-if (string=? "xy" (string-append/shared "" "xy" "" "")))
|
||||
(pass-if (string=? "xy" (string-append/shared "" "" "xy" "")))
|
||||
(pass-if (string=? "xy" (string-append/shared "" "" "" "xy")))
|
||||
|
||||
(pass-if (string=? "abxy" (string-append/shared "ab" "xy" "" "")))
|
||||
(pass-if (string=? "abxy" (string-append/shared "ab" "" "xy" "")))
|
||||
(pass-if (string=? "abxy" (string-append/shared "ab" "" "" "xy")))
|
||||
(pass-if (string=? "abxy" (string-append/shared "" "ab" "" "xy")))
|
||||
(pass-if (string=? "abxy" (string-append/shared "" "" "ab" "xy")))))
|
||||
|
||||
;;;
|
||||
;;; string-concatenate
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue