diff --git a/tests/r5rs-tests.scm b/tests/r5rs-tests.scm index 048c36d7..9673c081 100644 --- a/tests/r5rs-tests.scm +++ b/tests/r5rs-tests.scm @@ -177,6 +177,10 @@ (test #t (equal? "abc" "abc")) +(test #f (equal? "abc" "abcd")) + +(test #f (equal? "a" "b")) + (test #t (equal? 2 2)) ;;(test #f (eqv? 2 2.0)) @@ -358,6 +362,50 @@ (test "Malvina" (symbol->string (string->symbol "Malvina"))) +(test #t (string? "a")) + +(test #f (string? 'a)) + +(test 0 (string-length "")) + +(test 3 (string-length "abc")) + +(test #\a (string-ref "abc" 0)) + +(test #\c (string-ref "abc" 2)) + +(test "axc" (let ((s (string #\a #\b #\c))) (string-set! s 1 #\x) s)) + +(test #t (string=? "a" (string #\a))) + +(test #f (string=? "a" (string #\b))) + +(test #t (string