diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-08-24 22:14:57 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-08-24 22:14:57 +0000 |
commit | 7aa29a87f98cfbbb59bd4ba4329f24fcc54353f7 (patch) | |
tree | 2b1579bf6f5fa529adba746787e42460816b0f59 | |
parent | 1206efbe073b709bd61fa1cea90f058c45119efd (diff) | |
download | guile-7aa29a87f98cfbbb59bd4ba4329f24fcc54353f7.tar.gz |
Two more tests for double indirect substring modification.
-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"))))) |