1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-24 21:50:20 +02:00

Two more tests for double indirect substring modification.

This commit is contained in:
Marius Vollmer 2004-08-24 22:14:57 +00:00
parent 1206efbe07
commit 7aa29a87f9

View file

@ -100,4 +100,17 @@
(str2 (string-copy str1)))
(string-upcase! (substring/shared str2 3 6))
(and (string=? str1 "foofoofoo")
(string=? str2 "fooFOOfoo")))))
(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")))))