set tosort {}
         array set seenrand {}
         for {set i 0} {$i < 10000} {incr i} {
             while 1 {
                 # Make sure all the weights are different because
                 # Redis does not use a stable sort but Tcl does.
         set tosort {}
         array set seenrand {}
         for {set i 0} {$i < 10000} {incr i} {
             while 1 {
                 # Make sure all the weights are different because
                 # Redis does not use a stable sort but Tcl does.
     test {SORT with BY and STORE against the newly created list} {
         $r sort tosort {BY weight_*} store sort-res
         $r lrange sort-res 0 -1
     test {SORT with BY and STORE against the newly created list} {
         $r sort tosort {BY weight_*} store sort-res
         $r lrange sort-res 0 -1