File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,32 @@ start_server {
164
164
r lrange mylist 0 -1
165
165
} {a b c d e f g h i l m n o p q r s t u v z}
166
166
167
+ test " SORT will complain with numerical sorting and bad doubles (1)" {
168
+ r del myset
169
+ r sadd myset 1 2 3 4 not-a-double
170
+ set e {}
171
+ catch {r sort myset} e
172
+ set e
173
+ } {*ERR*double*}
174
+
175
+ test " SORT will complain with numerical sorting and bad doubles (2)" {
176
+ r del myset
177
+ r sadd myset 1 2 3 4
178
+ r mset score:1 10 score:2 20 score:3 30 score:4 not-a-double
179
+ set e {}
180
+ catch {r sort myset by score:*} e
181
+ set e
182
+ } {*ERR*double*}
183
+
184
+ test " SORT BY sub-sorts lexicographically if score is the same" {
185
+ r del myset
186
+ r sadd myset u v z a b c d e f g h i l m n o p q r s t
187
+ foreach ele {a b c d e f g h i l m n o p q r s t u v z} {
188
+ set score:$ele 100
189
+ }
190
+ r sort myset by score:*
191
+ } {a b c d e f g h i l m n o p q r s t u v z}
192
+
167
193
tags {" slow" } {
168
194
set num 100
169
195
set res [create_random_dataset $num lpush]
You can’t perform that action at this time.
0 commit comments