diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-20 17:51:42 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-20 17:51:42 (GMT) |
| commit | a1a443ef1d639bba76f8e66f8fa9aae4b4802e4f (patch) | |
| tree | f14659ed7bad541414714dedd7495931b47ebfaa /tests/dstring.test | |
| parent | 797aa89a3070e3e505f1761759a3264ce1628101 (diff) | |
| parent | 66386bc18bd9bde161513ff164561c0e052d35b5 (diff) | |
| download | tcl-a1a443ef1d639bba76f8e66f8fa9aae4b4802e4f.zip tcl-a1a443ef1d639bba76f8e66f8fa9aae4b4802e4f.tar.gz tcl-a1a443ef1d639bba76f8e66f8fa9aae4b4802e4f.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'tests/dstring.test')
| -rw-r--r-- | tests/dstring.test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/dstring.test b/tests/dstring.test index 11c5754..314cee8 100644 --- a/tests/dstring.test +++ b/tests/dstring.test @@ -473,6 +473,45 @@ test dstring-6.5 {Tcl_DStringGetResult} -constraints testdstring -body { } -cleanup { testdstring free } -result {{} {This is a specially-allocated stringz}} + +test dstring-7.1 {copying to Tcl_Obj} -constraints testdstring -setup { + testdstring free +} -body { + testdstring append xyz -1 + list [testdstring toobj] [testdstring length] +} -cleanup { + testdstring free +} -result {xyz 0} +test dstring-7.2 {copying to a Tcl_Obj} -constraints testdstring -setup { + testdstring free + unset -nocomplain a +} -body { + foreach l {a b c d e f g h i j k l m n o p} { + testdstring append $l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l\n -1 + } + set a [testdstring toobj] + testdstring append abc -1 + list $a [testdstring get] +} -cleanup { + testdstring free +} -result {{aaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbb +ccccccccccccccccccccc +ddddddddddddddddddddd +eeeeeeeeeeeeeeeeeeeee +fffffffffffffffffffff +ggggggggggggggggggggg +hhhhhhhhhhhhhhhhhhhhh +iiiiiiiiiiiiiiiiiiiii +jjjjjjjjjjjjjjjjjjjjj +kkkkkkkkkkkkkkkkkkkkk +lllllllllllllllllllll +mmmmmmmmmmmmmmmmmmmmm +nnnnnnnnnnnnnnnnnnnnn +ooooooooooooooooooooo +ppppppppppppppppppppp +} abc} + # cleanup if {[testConstraint testdstring]} { |
