diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2003-10-14 13:38:56 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2003-10-14 13:38:56 (GMT) |
commit | 53f461a314e8fda45504e3e1d7a51595d470604e (patch) | |
tree | b2cbbb019e4cdf4d753ee1bc61851378c4a508f8 /tests/cmdIL.test | |
parent | 8eb669eea67550509d7223f16753001c943d3ee3 (diff) | |
download | tcl-53f461a314e8fda45504e3e1d7a51595d470604e.zip tcl-53f461a314e8fda45504e3e1d7a51595d470604e.tar.gz tcl-53f461a314e8fda45504e3e1d7a51595d470604e.tar.bz2 |
TIP#127 Implementation. Thanks to Michael Schlenker for his implementation work
Diffstat (limited to 'tests/cmdIL.test')
-rw-r--r-- | tests/cmdIL.test | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/cmdIL.test b/tests/cmdIL.test index 01094b1..199fbd5 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdIL.test,v 1.15 2003/07/15 15:42:05 dkf Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.16 2003/10/14 13:38:58 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -356,6 +356,37 @@ test cmdIL-4.33 {DictionaryCompare procedure, chars between Z and a in ASCII} { lsort -dictionary [list AA ! c CC `] } [list ! ` AA c CC] +test cmdIL-5.1 {lsort with list style index} { + lsort -ascii -decreasing -index {0 1} { + {{Jim Alpha} 20000410} + {{Joe Bravo} 19990320} + {{Jacky Charlie} 19390911} + } +} {{{Jacky Charlie} 19390911} {{Joe Bravo} 19990320} {{Jim Alpha} 20000410}} +test cmdIL-5.2 {lsort with list style index} { + lsort -decreasing -index {0 1} { + {{Jim Alpha} 20000410} + {{Joe Bravo} 19990320} + {{Jacky Charlie} 19390911} + } +} {{{Jacky Charlie} 19390911} {{Joe Bravo} 19990320} {{Jim Alpha} 20000410}} +test cmdIL-5.3 {lsort with list style index} { + lsort -integer -increasing -index {1 end} { + {{Jim Alpha} 20000410} + {{Joe Bravo} 19990320} + {{Jacky Charlie} 19390911} + } +} {{{Jacky Charlie} 19390911} {{Joe Bravo} 19990320} {{Jim Alpha} 20000410}} +test cmdIL-5.4 {lsort with list style index} { + lsort -integer -index {1 end-1} { + {the {0 1 2 3 4 5} quick} + {brown {0 1 2 3 4} fox} + {jumps {30 31 2 33} over} + {the {0 1 2} lazy} + {dogs {0 1}} + } +} {{dogs {0 1}} {the {0 1 2} lazy} {jumps {30 31 2 33} over} {brown {0 1 2 3 4} fox} {the {0 1 2 3 4 5} quick}} + # cleanup ::tcltest::cleanupTests return |