summaryrefslogtreecommitdiffstats
path: root/tests/list.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/list.test')
-rw-r--r--tests/list.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/list.test b/tests/list.test
index 5a002a9..dff5d50 100644
--- a/tests/list.test
+++ b/tests/list.test
@@ -44,6 +44,26 @@ test list-1.23 {basic tests} {list \{} "\\{"
test list-1.24 {basic tests} {list} {}
test list-1.25 {basic tests} {list # #} {{#} #}
test list-1.26 {basic tests} {list #\{ #\{} {\#\{ #\{}
+test list-1.27 {basic null treatment} {
+ set l [list "" "\0" "\0\0"]
+ set e "{} \0 \0\0"
+ string equal $l $e
+} 1
+test list-1.28 {basic null treatment} {
+ set result "\0a\0b"
+ list $result [string length $result]
+} "\0a\0b 4"
+test list-1.29 {basic null treatment} {
+ set result "\0a\0b"
+ set srep "$result 4"
+ set lrep [list $result [string length $result]]
+ string equal $srep $lrep
+} 1
+test list-1.30 {basic null treatment} {
+ set l [list "\0abc" "xyz"]
+ set e "\0abc xyz"
+ string equal $l $e
+} 1
# For the next round of tests create a list and then pick it apart
# with "index" to make sure that we get back exactly what went in.