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:
parent
1206efbe07
commit
7aa29a87f9
1 changed files with 14 additions and 1 deletions
|
@ -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")))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue