ikarus/scheme/tests/strings.ss

25 lines
722 B
Scheme
Raw Normal View History

(library (tests strings)
2008-10-18 13:03:17 -04:00
(export run-tests)
(import (ikarus) (tests framework))
2008-10-18 13:03:17 -04:00
(define (run-tests) (test-strings))
(define-tests test-strings
[values
(string-ci=? "Strasse" "Stra\xDF;e")]
;[(lambda (x) (string=? x "STRASSE"))
; (string-upcase "Stra\xDF;e")]
;[(lambda (x) (string=? x "stra\xDF;e"))
; (string-downcase "Stra\xDF;e")]
[(lambda (x) (string=? x "strasse"))
(string-foldcase "Stra\xDF;e")]
;[(lambda (x) (string=? x "strasse"))
; (string-downcase "STRASSE")]
[values (string-ci=? "Stra\xDF;e" "Strasse")]
[values (string-ci=? "Stra\xDF;e" "STRASSE")]
[values (string-ci=? "\xDF;" "SS")]
[values (string-ci=? "\xDF;\xDF;" "SSSS")]
))