diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-02-24 14:30:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-02-24 14:30:31 (GMT) |
commit | 96d071af5418655b8dfbecd0410b6e5d07bfbde5 (patch) | |
tree | 02ebdf02ca154c666a08cbc7e9b057a16e1dc918 /tests | |
parent | 3201edaaf6efa495d6e2c747817da9ba884a8be5 (diff) | |
download | tcl-96d071af5418655b8dfbecd0410b6e5d07bfbde5.zip tcl-96d071af5418655b8dfbecd0410b6e5d07bfbde5.tar.gz tcl-96d071af5418655b8dfbecd0410b6e5d07bfbde5.tar.bz2 |
Fix some nasties with handling duplicate keys in list->dict->list conversions.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dict.test | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/dict.test b/tests/dict.test index 7c16c5f..e6b9ba4 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.34 2009/10/29 11:49:25 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.35 2010/02/24 14:30:34 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -29,7 +29,7 @@ if {[testConstraint memory]} { expr {$end - $tmp} } } - + test dict-1.1 {dict command basic syntax} -returnCodes error -body { dict } -result {wrong # args: should be "dict subcommand ?arg ...?"} @@ -938,6 +938,18 @@ test dict-18.2 {dict-list relationship} -body { } -cleanup { unset d t } -result 6 +test dict-18.3 {dict-list relationship} -body { + set ld [list a b c d c e f g] + list [string length $ld] [dict size $ld] [llength $ld] +} -cleanup { + unset ld +} -result {15 3 8} +test dict-18.4 {dict-list relationship} -body { + set ld [list a b c d c e f g] + list [llength $ld] [dict size $ld] [llength $ld] +} -cleanup { + unset ld +} -result {8 3 8} # This is a test for a specific bug. # It shows a bad ref counter when running with memdebug on. @@ -1340,7 +1352,7 @@ test dict-22.11 {dict with command: no recursive structures [Bug 1786481]} -body } -cleanup { unset foo t inner } -result OK - + # cleanup ::tcltest::cleanupTests return |