From 54867c8febc798f6f9002a74120d8c9c115bf6bb Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 9 Apr 2020 18:41:12 +0000 Subject: More tests. --- tests/dstring.test | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/dstring.test b/tests/dstring.test index 5151d27..f2d8656 100644 --- a/tests/dstring.test +++ b/tests/dstring.test @@ -137,6 +137,20 @@ test dstring-2.13 {appending list elements} testdstring { testdstring element # testdstring get } {x #} +test dstring-2.14 {appending list elements} testdstring { + testdstring free + testdstring append " " -1 + testdstring element # + testdstring get +} { {#}} +test dstring-2.15 {appending list elements} testdstring { + # This test checks the sophistication in Tcl_DStringAppendElement's + # decision about whether #-quoting can be disabled. + testdstring free + testdstring append "x " -1 + testdstring element # + testdstring get +} {x #} test dstring-3.1 {nested sublists} testdstring { testdstring free @@ -237,6 +251,26 @@ test dstring-3.10 {appending list elements} testdstring { testdstring end testdstring get } {x {x #}} +test dstring-3.11 {appending list elements} testdstring { + testdstring free + testdstring append x -1 + testdstring start + testdstring append " " -1 + testdstring element # + testdstring end + testdstring get +} {x { {#}}} +test dstring-3.12 {appending list elements} testdstring { + # This test checks the sophistication in Tcl_DStringAppendElement's + # decision about whether #-quoting can be disabled. + testdstring free + testdstring append x -1 + testdstring start + testdstring append "x " -1 + testdstring element # + testdstring end + testdstring get +} {x {x #}} test dstring-4.1 {truncation} testdstring { testdstring free -- cgit v0.12