diff options
-rw-r--r-- | test-suite/tests/strings.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test-suite/tests/strings.test b/test-suite/tests/strings.test index a21553224..544c8eb9c 100644 --- a/test-suite/tests/strings.test +++ b/test-suite/tests/strings.test @@ -100,4 +100,17 @@ (str2 (string-copy str1))) (string-upcase! (substring/shared str2 3 6)) (and (string=? str1 "foofoofoo") - (string=? str2 "fooFOOfoo")))))
\ No newline at end of file + (string=? str2 "fooFOOfoo")))) + + (pass-if "modify double indirectly" + (let* ((str1 "foofoofoo") + (str2 (substring/shared str1 2 7))) + (string-upcase! (substring/shared str2 1 4)) + (string=? str1 "fooFOOfoo"))) + + (pass-if "modify cow double indirectly" + (let* ((str1 "foofoofoo") + (str2 (substring str1 2 7))) + (string-upcase! (substring/shared str2 1 4)) + (and (string=? str1 "foofoofoo") + (string=? str2 "oFOOf"))))) |