1 source [file dirname [info script]]/testing.tcl
5 proc sorter {a v1 v2} {
7 return [string compare $v1 $v2]
10 proc test_lsort_cmd {test cmd list exp} {
11 lsort -command $cmd $list
17 test lsortcmd-1.1 "Sort with one arg" {
18 lsort -command "sorter arg1" $list
22 test lsortcmd-1.2 "Sort with one arg containg spaces" {
23 lsort -command {sorter "arg with space"} $list
27 test lsortcmd-1.3 "Sort with arg as list containg spaces" {
28 lsort -command [list sorter [list arg with list "last with spaces"]] $list
30 } {arg with list {last with spaces}}