summaryrefslogtreecommitdiffstats
path: root/tests/util.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-04-09 16:24:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-04-09 16:24:34 (GMT)
commit77dbe8dc087788e733edf13dedd31202b18fded4 (patch)
treeba05ec50f644192b22f59c1fddccf303d4624306 /tests/util.test
parent94a4f5be20584689a3ab5fe061fbc304c7cd18b3 (diff)
downloadtcl-77dbe8dc087788e733edf13dedd31202b18fded4.zip
tcl-77dbe8dc087788e733edf13dedd31202b18fded4.tar.gz
tcl-77dbe8dc087788e733edf13dedd31202b18fded4.tar.bz2
[afa4b28153] Correct TclNeedSpace handling of trailing escaped space.
Diffstat (limited to 'tests/util.test')
-rw-r--r--tests/util.test10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/util.test b/tests/util.test
index 294d883..46d9152 100644
--- a/tests/util.test
+++ b/tests/util.test
@@ -503,25 +503,19 @@ test util-8.4 {TclNeedSpace - correct UTF8 handling} testdstring {
llength [testdstring get]
} 2
test util-8.5 {TclNeedSpace - correct UTF8 handling} testdstring {
- # Note that in this test TclNeedSpace actually gets it wrong,
- # claiming we need a space when we really do not. Extra space
- # between list elements is harmless though, and better to have
- # extra space in really weird string reps of lists, than to
- # invest the effort required to make TclNeedSpace foolproof.
testdstring free
testdstring append {\\ } -1
testdstring element foo
list [llength [testdstring get]] [string length [testdstring get]]
-} {2 7}
+} {2 6}
test util-8.6 {TclNeedSpace - correct UTF8 handling} testdstring {
- # Another example of TclNeedSpace harmlessly getting it wrong.
testdstring free
testdstring append {\\ } -1
testdstring append \{ -1
testdstring element foo
testdstring append \} -1
list [llength [testdstring get]] [string length [testdstring get]]
-} {2 9}
+} {2 8}
test util-8.7 {TclNeedSpace - watch out for escaped space} {
testdstring free
testdstring append {\ } -1