mirror of https://github.com/valkey-io/valkey
spelling: nonexistent
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
502dd451d1
commit
db6170b6f3
|
|
@ -656,7 +656,7 @@ static void ACLChangeSelectorPerm(aclSelector *selector, struct serverCommand *c
|
|||
/* This is like ACLSetSelectorCommandBit(), but instead of setting the specified
|
||||
* ID, it will check all the commands in the category specified as argument,
|
||||
* and will set all the bits corresponding to such commands to the specified
|
||||
* value. Since the category passed by the user may be non existing, the
|
||||
* value. Since the category passed by the user may be nonexistent, the
|
||||
* function returns C_ERR if the category was not found, or C_OK if it was
|
||||
* found and the operation was performed. */
|
||||
static void ACLSetSelectorCommandBitsForCategory(hashtable *commands, aclSelector *selector, uint64_t cflag, int value) {
|
||||
|
|
|
|||
|
|
@ -1013,7 +1013,7 @@ void bitcountCommand(client *c) {
|
|||
return;
|
||||
}
|
||||
|
||||
/* Return 0 for non existing keys. */
|
||||
/* Return 0 for nonexistent keys. */
|
||||
if (o == NULL) {
|
||||
addReply(c, shared.czero);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
}
|
||||
],
|
||||
"reply_schema": {
|
||||
"description": "Number of members that were removed from the set, not including non existing members.",
|
||||
"description": "Number of members that were removed from the set, not including nonexistent members.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
}
|
||||
],
|
||||
"reply_schema": {
|
||||
"description": "The number of members removed from the sorted set, not including non existing members.",
|
||||
"description": "The number of members removed from the sorted set, not including nonexistent members.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1686,7 +1686,7 @@ void pfcountCommand(client *c) {
|
|||
for (j = 1; j < c->argc; j++) {
|
||||
/* Check type and size. */
|
||||
robj *o = lookupKeyRead(c->db, c->argv[j]);
|
||||
if (o == NULL) continue; /* Assume empty HLL for non existing var.*/
|
||||
if (o == NULL) continue; /* Assume empty HLL for nonexistent var.*/
|
||||
if (isHLLObjectOrReply(c, o) != C_OK) return;
|
||||
|
||||
/* Merge with this HLL with our 'max' HLL by setting max[i]
|
||||
|
|
@ -1774,7 +1774,7 @@ void pfmergeCommand(client *c) {
|
|||
for (j = 1; j < c->argc; j++) {
|
||||
/* Check type and size. */
|
||||
robj *o = lookupKeyRead(c->db, c->argv[j]);
|
||||
if (o == NULL) continue; /* Assume empty HLL for non existing var. */
|
||||
if (o == NULL) continue; /* Assume empty HLL for nonexistent var. */
|
||||
if (isHLLObjectOrReply(c, o) != C_OK) return;
|
||||
|
||||
/* If at least one involved HLL is dense, use the dense representation
|
||||
|
|
|
|||
|
|
@ -750,7 +750,7 @@ void moduleReleaseTempClient(client *c) {
|
|||
|
||||
/* Create an empty key of the specified type. `key` must point to a key object
|
||||
* opened for writing where the `.value` member is set to NULL because the
|
||||
* key was found to be non existing.
|
||||
* key was found to be nonexistent.
|
||||
*
|
||||
* On success VALKEYMODULE_OK is returned and the key is populated with
|
||||
* the value of the specified type. The function fails and returns
|
||||
|
|
@ -763,7 +763,7 @@ void moduleReleaseTempClient(client *c) {
|
|||
int moduleCreateEmptyKey(ValkeyModuleKey *key, int type) {
|
||||
robj *obj;
|
||||
|
||||
/* The key must be open for writing and non existing to proceed. */
|
||||
/* The key must be open for writing and nonexistent to proceed. */
|
||||
if (!(key->mode & VALKEYMODULE_WRITE) || key->value) return VALKEYMODULE_ERR;
|
||||
|
||||
switch (type) {
|
||||
|
|
|
|||
|
|
@ -2138,7 +2138,7 @@ void beforeNextClient(client *c) {
|
|||
/* Handle async frees */
|
||||
/* Note: this doesn't make the server.clients_to_close list redundant because of
|
||||
* cases where we want an async free of a client other than myself. For example
|
||||
* in ACL modifications we disconnect clients authenticated to non-existent
|
||||
* in ACL modifications we disconnect clients authenticated to nonexistent
|
||||
* users (see ACL LOAD). */
|
||||
if (c->flag.close_asap) {
|
||||
freeClient(c);
|
||||
|
|
|
|||
|
|
@ -1297,7 +1297,7 @@ void raxIteratorDelChars(raxIterator *it, size_t count) {
|
|||
* lexicographically smaller children, and the current node is already assumed
|
||||
* to be the parent of the last key node, so the first operation to go back to
|
||||
* the parent will be skipped. This option is used by raxSeek() when
|
||||
* implementing seeking a non existing element with the ">" or "<" options:
|
||||
* implementing seeking a nonexistent element with the ">" or "<" options:
|
||||
* the starting node is not a key in that particular case, so we start the scan
|
||||
* from a node that does not represent the key set.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1534,7 +1534,7 @@ void sunionDiffGenericCommand(client *c, robj **setkeys, int setnum, robj *dstke
|
|||
/* Union is trivial, just add every element of every set to the
|
||||
* temporary set. */
|
||||
for (j = 0; j < setnum; j++) {
|
||||
if (!sets[j]) continue; /* non existing keys are like empty sets */
|
||||
if (!sets[j]) continue; /* nonexistent keys are like empty sets */
|
||||
|
||||
si = setTypeInitIterator(sets[j]);
|
||||
while ((encoding = setTypeNext(si, &str, &len, &llval)) != -1) {
|
||||
|
|
@ -1575,7 +1575,7 @@ void sunionDiffGenericCommand(client *c, robj **setkeys, int setnum, robj *dstke
|
|||
* This is O(N) where N is the sum of all the elements in every
|
||||
* set. */
|
||||
for (j = 0; j < setnum; j++) {
|
||||
if (!sets[j]) continue; /* non existing keys are like empty sets */
|
||||
if (!sets[j]) continue; /* nonexistent keys are like empty sets */
|
||||
|
||||
si = setTypeInitIterator(sets[j]);
|
||||
while ((encoding = setTypeNext(si, &str, &len, &llval)) != -1) {
|
||||
|
|
|
|||
|
|
@ -3070,7 +3070,7 @@ void xpendingCommand(client *c) {
|
|||
* Creates the pending message entry in the PEL even if certain
|
||||
* specified IDs are not already in the PEL assigned to a different
|
||||
* client. However the message must be exist in the stream, otherwise
|
||||
* the IDs of non existing messages are ignored.
|
||||
* the IDs of nonexistent messages are ignored.
|
||||
*
|
||||
* 5. JUSTID:
|
||||
* Return just an array of IDs of messages successfully claimed,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ test "Enable AOF in all the instances" {
|
|||
# Return non-zero if the specified PID is about a process still in execution,
|
||||
# otherwise 0 is returned.
|
||||
proc process_is_running {pid} {
|
||||
# PS should return with an error if PID is non existing,
|
||||
# PS should return with an error if PID is nonexistent,
|
||||
# and catch will return non-zero. We want to return non-zero if
|
||||
# the PID exists, so we invert the return value with expr not operator.
|
||||
expr {![catch {exec ps -p $pid}]}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ start_server {tags {"bitops"}} {
|
|||
assert_error "*WRONGTYPE*" {r bitcount mylist -6 -15 bit}
|
||||
}
|
||||
|
||||
test {BITCOUNT returns 0 against non existing key} {
|
||||
test {BITCOUNT returns 0 against nonexistent key} {
|
||||
r del no-key
|
||||
assert {[r bitcount no-key] == 0}
|
||||
assert {[r bitcount no-key 0 1000 bit] == 0}
|
||||
|
|
@ -73,7 +73,7 @@ start_server {tags {"bitops"}} {
|
|||
assert {[r bitcount str -6 -7] == 0}
|
||||
assert {[r bitcount str -6 -15 bit] == 0}
|
||||
|
||||
# against non existing key
|
||||
# against nonexistent key
|
||||
r del str
|
||||
assert {[r bitcount str -6 -7] == 0}
|
||||
assert {[r bitcount str -6 -15 bit] == 0}
|
||||
|
|
@ -178,7 +178,7 @@ start_server {tags {"bitops"}} {
|
|||
r set s 1
|
||||
assert_error {ERR *not an integer*} {r bitcount s a b}
|
||||
|
||||
# against non existing key
|
||||
# against nonexistent key
|
||||
r del s
|
||||
assert_error {ERR *not an integer*} {r bitcount s a b}
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ start_server {tags {"bitops"}} {
|
|||
assert_error {ERR *not an integer*} {r bitpos s a}
|
||||
assert_error {ERR *not an integer*} {r bitpos s 0 a b}
|
||||
|
||||
# against non existing key
|
||||
# against nonexistent key
|
||||
r del s
|
||||
assert_error {ERR *not an integer*} {r bitpos s b}
|
||||
assert_error {ERR *not an integer*} {r bitpos s 0 a b}
|
||||
|
|
|
|||
|
|
@ -851,12 +851,12 @@ start_cluster 1 0 {tags {external:skip cluster} overrides {cluster-slot-stats-en
|
|||
}
|
||||
|
||||
test "CLUSTER SLOT-STATS ORDERBY arg sanity check." {
|
||||
# Non-existent argument.
|
||||
assert_error "ERR*" {R 0 CLUSTER SLOT-STATS ORDERBY key-count non-existent-arg}
|
||||
# Nonexistent argument.
|
||||
assert_error "ERR*" {R 0 CLUSTER SLOT-STATS ORDERBY key-count nonexistent-arg}
|
||||
# Negative LIMIT.
|
||||
assert_error "ERR*" {R 0 CLUSTER SLOT-STATS ORDERBY key-count DESC LIMIT -1}
|
||||
# Non-existent ORDERBY metric.
|
||||
assert_error "ERR*" {R 0 CLUSTER SLOT-STATS ORDERBY non-existent-metric}
|
||||
# Nonexistent ORDERBY metric.
|
||||
assert_error "ERR*" {R 0 CLUSTER SLOT-STATS ORDERBY nonexistent-metric}
|
||||
# When cluster-slot-stats-enabled config is disabled, you cannot sort using advanced metrics.
|
||||
R 0 CONFIG SET cluster-slot-stats-enabled no
|
||||
set orderby "cpu-usec"
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ start_server {tags {"dump"}} {
|
|||
assert_equal {bar} [r get foo]
|
||||
}
|
||||
|
||||
test {DUMP of non existing key returns nil} {
|
||||
test {DUMP of nonexistent key returns nil} {
|
||||
r dump nonexisting_key
|
||||
} {}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ start_server {tags {"expire"}} {
|
|||
list [r ttl x] [r persist x] [r ttl x] [r get x]
|
||||
} {50 1 -1 foo}
|
||||
|
||||
test {PERSIST returns 0 against non existing or non volatile keys} {
|
||||
test {PERSIST returns 0 against nonexistent or non volatile keys} {
|
||||
r set x foo
|
||||
list [r persist foo] [r persist nokeyatall]
|
||||
} {0 0}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ start_server {tags {"geo"}} {
|
|||
verify_geo_edge_response_generic "WRONGTYPE*"
|
||||
}
|
||||
|
||||
test {GEO with non existing src key} {
|
||||
test {GEO with nonexistent src key} {
|
||||
r del src{t}
|
||||
|
||||
verify_geo_edge_response_bylonlat {} 0
|
||||
|
|
@ -157,7 +157,7 @@ start_server {tags {"geo"}} {
|
|||
verify_geo_edge_response_bylonlat {} 0
|
||||
}
|
||||
|
||||
test {GEO BYMEMBER with non existing member} {
|
||||
test {GEO BYMEMBER with nonexistent member} {
|
||||
r del src{t}
|
||||
r geoadd src{t} 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"
|
||||
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ start_server {tags {"info" "external:skip" "debug_defrag:skip"}} {
|
|||
assert_equal {1} [subscribe $rd2 {chan2}]
|
||||
set info [r info clients]
|
||||
assert_equal [getInfoProperty $info pubsub_clients] {2}
|
||||
# unsubscribe non existing channel
|
||||
# unsubscribe nonexistent channel
|
||||
assert_equal {1} [unsubscribe $rd2 {non-exist-chan}]
|
||||
set info [r info clients]
|
||||
assert_equal [getInfoProperty $info pubsub_clients] {2}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ start_server {tags {"introspection"}} {
|
|||
assert_not_equal [lsearch $commands "client|list"] -1
|
||||
}
|
||||
|
||||
test "COMMAND LIST FILTERBY ACLCAT against non existing category" {
|
||||
test "COMMAND LIST FILTERBY ACLCAT against nonexistent category" {
|
||||
assert_equal {} [r command list filterby aclcat non_existing_category]
|
||||
}
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ start_server {tags {"introspection"}} {
|
|||
assert_equal {} [r command list filterby pattern non_exists*]
|
||||
}
|
||||
|
||||
test "COMMAND LIST FILTERBY MODULE against non existing module" {
|
||||
test "COMMAND LIST FILTERBY MODULE against nonexistent module" {
|
||||
# This should be empty, the real one is in subcommands.tcl
|
||||
assert_equal {} [r command list filterby module non_existing_module]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ start_server {tags {"keyspace"}} {
|
|||
append res [r get mykey2{t}]
|
||||
} {foobar}
|
||||
|
||||
test {RENAME against non existing source key} {
|
||||
test {RENAME against nonexistent source key} {
|
||||
catch {r rename nokey{t} foobar{t}} err
|
||||
format $err
|
||||
} {ERR*}
|
||||
|
|
@ -145,7 +145,7 @@ start_server {tags {"keyspace"}} {
|
|||
r renamenx mykey mykey
|
||||
} {0}
|
||||
|
||||
test {RENAME where source and dest key are the same (non existing)} {
|
||||
test {RENAME where source and dest key are the same (nonexistent)} {
|
||||
r del mykey
|
||||
catch {r rename mykey mykey} err
|
||||
format $err
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ start_server {tags {"modules"}} {
|
|||
assert_equal {OK} [r testmoduleone.rm_register_auth_cb]
|
||||
}
|
||||
|
||||
test {test module AUTH for non existing / disabled users} {
|
||||
test {test module AUTH for nonexistent / disabled users} {
|
||||
r config resetstat
|
||||
# Validate that an error is thrown for non existing users.
|
||||
# Validate that an error is thrown for nonexistent users.
|
||||
assert_error {*WRONGPASS*} {r AUTH foo pwd}
|
||||
assert_match {*calls=1,*,rejected_calls=0,failed_calls=1} [cmdstat auth]
|
||||
# Validate that an error is thrown for disabled users.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ start_server {tags {"hash"}} {
|
|||
assert_error {*value is out of range*} {r hrandfield myhash -9223372036854775808}
|
||||
} {}
|
||||
|
||||
test "HRANDFIELD with <count> against non existing key" {
|
||||
test "HRANDFIELD with <count> against nonexistent key" {
|
||||
r hrandfield nonexisting_key 100
|
||||
} {}
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ start_server {tags {"hash"}} {
|
|||
r hrandfield myhash 0
|
||||
} {*0}
|
||||
|
||||
test "HRANDFIELD with <count> against non existing key - emptyarray" {
|
||||
test "HRANDFIELD with <count> against nonexistent key - emptyarray" {
|
||||
r hrandfield nonexisting_key 100
|
||||
} {*0}
|
||||
|
||||
|
|
@ -269,7 +269,7 @@ start_server {tags {"hash"}} {
|
|||
set _ $err
|
||||
} {}
|
||||
|
||||
test {HGET against non existing key} {
|
||||
test {HGET against nonexistent key} {
|
||||
set rv {}
|
||||
lappend rv [r hget smallhash __123123123__]
|
||||
lappend rv [r hget bighash __123123123__]
|
||||
|
|
@ -342,9 +342,9 @@ start_server {tags {"hash"}} {
|
|||
r hmset bighash {*}$args
|
||||
} {OK}
|
||||
|
||||
test {HMGET against non existing key and fields} {
|
||||
test {HMGET against nonexistent key and fields} {
|
||||
set rv {}
|
||||
lappend rv [r hmget doesntexist __123123123__ __456456456__]
|
||||
lappend rv [r hmget nonexistent __123123123__ __456456456__]
|
||||
lappend rv [r hmget smallhash __123123123__ __456456456__]
|
||||
lappend rv [r hmget bighash __123123123__ __456456456__]
|
||||
set _ $rv
|
||||
|
|
@ -488,7 +488,7 @@ start_server {tags {"hash"}} {
|
|||
r debug object smallhash
|
||||
} {*hashtable*} {needs:debug}
|
||||
|
||||
test {HINCRBY against non existing database key} {
|
||||
test {HINCRBY against nonexistent database key} {
|
||||
r del htest
|
||||
list [r hincrby htest foo 2]
|
||||
} {2}
|
||||
|
|
@ -500,7 +500,7 @@ start_server {tags {"hash"}} {
|
|||
assert_error "*value is not a*" {r hincrbyfloat incrhash field v}
|
||||
}
|
||||
|
||||
test {HINCRBY against non existing hash key} {
|
||||
test {HINCRBY against nonexistent hash key} {
|
||||
set rv {}
|
||||
r hdel smallhash tmp
|
||||
r hdel bighash tmp
|
||||
|
|
@ -564,12 +564,12 @@ start_server {tags {"hash"}} {
|
|||
set e
|
||||
} {*overflow*}
|
||||
|
||||
test {HINCRBYFLOAT against non existing database key} {
|
||||
test {HINCRBYFLOAT against nonexistent database key} {
|
||||
r del htest
|
||||
list [r hincrbyfloat htest foo 2.5]
|
||||
} {2.5}
|
||||
|
||||
test {HINCRBYFLOAT against non existing hash key} {
|
||||
test {HINCRBYFLOAT against nonexistent hash key} {
|
||||
set rv {}
|
||||
r hdel smallhash tmp
|
||||
r hdel bighash tmp
|
||||
|
|
@ -660,7 +660,7 @@ start_server {tags {"hash"}} {
|
|||
set _ $err
|
||||
} {}
|
||||
|
||||
test {HSTRLEN against non existing field} {
|
||||
test {HSTRLEN against nonexistent field} {
|
||||
set rv {}
|
||||
lappend rv [r hstrlen smallhash __123123123__]
|
||||
lappend rv [r hstrlen bighash __123123123__]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
start_server {tags {"incr"}} {
|
||||
test {INCR against non existing key} {
|
||||
test {INCR against nonexistent key} {
|
||||
set res {}
|
||||
append res [r incr novar]
|
||||
append res [r get novar]
|
||||
|
|
@ -87,7 +87,7 @@ start_server {tags {"incr"}} {
|
|||
assert {$old eq $new}
|
||||
} {} {needs:debug}
|
||||
|
||||
test {INCRBYFLOAT against non existing key} {
|
||||
test {INCRBYFLOAT against nonexistent key} {
|
||||
r del novar
|
||||
list [roundFloat [r incrbyfloat novar 1]] \
|
||||
[roundFloat [r get novar]] \
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ foreach {type large} [array get largevalue] {
|
|||
assert {[r LPOS mylist c COUNT 2 RANK -1] == {7 6}}
|
||||
}
|
||||
|
||||
test {LPOS non existing key} {
|
||||
test {LPOS nonexistent key} {
|
||||
assert {[r LPOS mylistxxx c COUNT 0 RANK 2] eq {}}
|
||||
}
|
||||
|
||||
|
|
@ -608,14 +608,14 @@ foreach {type large} [array get largevalue] {
|
|||
assert_equal {*0} [r rpop listcount 0]
|
||||
}
|
||||
|
||||
test "LPOP/RPOP against non existing key in RESP$resp" {
|
||||
test "LPOP/RPOP against nonexistent key in RESP$resp" {
|
||||
r del non_existing_key
|
||||
|
||||
verify_resp_response $resp [r lpop non_existing_key] {$-1} {_}
|
||||
verify_resp_response $resp [r rpop non_existing_key] {$-1} {_}
|
||||
}
|
||||
|
||||
test "LPOP/RPOP with <count> against non existing key in RESP$resp" {
|
||||
test "LPOP/RPOP with <count> against nonexistent key in RESP$resp" {
|
||||
r del non_existing_key
|
||||
|
||||
verify_resp_response $resp [r lpop non_existing_key 0] {*-1} {_}
|
||||
|
|
@ -1492,7 +1492,7 @@ foreach {pop} {BLPOP BLMPOP_LEFT} {
|
|||
assert_error {WRONGTYPE Operation against a key holding the wrong kind of value*} {r linsert k1 after 0 0}
|
||||
}
|
||||
|
||||
test {LINSERT against non existing key} {
|
||||
test {LINSERT against nonexistent key} {
|
||||
assert_equal 0 [r linsert not-a-key before 0 0]
|
||||
}
|
||||
|
||||
|
|
@ -1552,7 +1552,7 @@ foreach type {listpack quicklist} {
|
|||
assert_error WRONGTYPE* {r llen mylist}
|
||||
}
|
||||
|
||||
test {LLEN against non existing key} {
|
||||
test {LLEN against nonexistent key} {
|
||||
assert_equal 0 [r llen not-a-key]
|
||||
}
|
||||
|
||||
|
|
@ -1560,7 +1560,7 @@ foreach type {listpack quicklist} {
|
|||
assert_error WRONGTYPE* {r lindex mylist 0}
|
||||
}
|
||||
|
||||
test {LINDEX against non existing key} {
|
||||
test {LINDEX against nonexistent key} {
|
||||
assert_equal "" [r lindex not-a-key 10]
|
||||
}
|
||||
|
||||
|
|
@ -1682,7 +1682,7 @@ foreach type {listpack quicklist} {
|
|||
}
|
||||
}
|
||||
|
||||
test {RPOPLPUSH against non existing key} {
|
||||
test {RPOPLPUSH against nonexistent key} {
|
||||
r del srclist{t} dstlist{t}
|
||||
assert_equal {} [r rpoplpush srclist{t} dstlist{t}]
|
||||
assert_equal 0 [r exists srclist{t}]
|
||||
|
|
@ -1707,7 +1707,7 @@ foreach {type large} [array get largevalue] {
|
|||
}
|
||||
}
|
||||
|
||||
test {RPOPLPUSH against non existing src key} {
|
||||
test {RPOPLPUSH against nonexistent src key} {
|
||||
r del srclist{t} dstlist{t}
|
||||
assert_equal {} [r rpoplpush srclist{t} dstlist{t}]
|
||||
} {}
|
||||
|
|
@ -1920,7 +1920,7 @@ foreach {type large} [array get largevalue] {
|
|||
}
|
||||
}
|
||||
|
||||
test {LRANGE against non existing key} {
|
||||
test {LRANGE against nonexistent key} {
|
||||
assert_equal {} [r lrange nosuchkey 0 1]
|
||||
}
|
||||
|
||||
|
|
@ -1971,7 +1971,7 @@ foreach {type large} [array get largevalue] {
|
|||
}
|
||||
}
|
||||
|
||||
test {LSET against non existing key} {
|
||||
test {LSET against nonexistent key} {
|
||||
assert_error ERR*key* {r lset nosuchkey 10 foo}
|
||||
}
|
||||
|
||||
|
|
@ -1992,7 +1992,7 @@ foreach {type large} [array get largevalue] {
|
|||
assert_equal "$e foobar foobared zap test foo" [r lrange mylist 0 -1]
|
||||
}
|
||||
|
||||
test "LREM remove non existing element - $type" {
|
||||
test "LREM remove nonexistent element - $type" {
|
||||
assert_equal 0 [r lrem mylist 1 nosuchelement]
|
||||
assert_equal "$e foobar foobared zap test foo" [r lrange mylist 0 -1]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ start_server {
|
|||
assert_error WRONGTYPE* {r scard mylist}
|
||||
}
|
||||
|
||||
test {SMISMEMBER SMEMBERS SCARD against non existing key} {
|
||||
test {SMISMEMBER SMEMBERS SCARD against nonexistent key} {
|
||||
assert_equal {0} [r smismember myset1 foo]
|
||||
assert_equal {0 0} [r smismember myset1 foo bar]
|
||||
assert_equal {} [r smembers myset1]
|
||||
|
|
@ -363,7 +363,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_equal [list 195 199 $large] [lsort [r smembers setres{t}]]
|
||||
}
|
||||
|
||||
test "SUNION with non existing keys - $type" {
|
||||
test "SUNION with nonexistent keys - $type" {
|
||||
set expected [lsort -uniq "[r smembers set1{t}] [r smembers set2{t}]"]
|
||||
assert_equal $expected [lsort [r sunion nokey1{t} set1{t} set2{t} nokey2{t}]]
|
||||
}
|
||||
|
|
@ -487,7 +487,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_error "WRONGTYPE*" {r sdiff set1{t} key1{t}}
|
||||
}
|
||||
|
||||
test "SDIFF should handle non existing key as empty" {
|
||||
test "SDIFF should handle nonexistent key as empty" {
|
||||
r del set1{t} set2{t} set3{t}
|
||||
|
||||
r sadd set1{t} a b c
|
||||
|
|
@ -519,7 +519,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_equal {e} [lsort [r smembers set3{t}]]
|
||||
}
|
||||
|
||||
test "SDIFFSTORE should handle non existing key as empty" {
|
||||
test "SDIFFSTORE should handle nonexistent key as empty" {
|
||||
r del set1{t} set2{t} set3{t}
|
||||
|
||||
r set setres{t} xxx
|
||||
|
|
@ -554,7 +554,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_error "WRONGTYPE*" {r sinter set1{t} key1{t}}
|
||||
}
|
||||
|
||||
test "SINTER should handle non existing key as empty" {
|
||||
test "SINTER should handle nonexistent key as empty" {
|
||||
r del set1{t} set2{t} set3{t}
|
||||
r sadd set1{t} a b c
|
||||
r sadd set2{t} b c d
|
||||
|
|
@ -594,7 +594,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_equal {e} [lsort [r smembers set3{t}]]
|
||||
}
|
||||
|
||||
test "SINTERSTORE against non existing keys should delete dstkey" {
|
||||
test "SINTERSTORE against nonexistent keys should delete dstkey" {
|
||||
r del set1{t} set2{t} set3{t}
|
||||
|
||||
r set setres{t} xxx
|
||||
|
|
@ -627,7 +627,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_error "WRONGTYPE*" {r sunion set1{t} key1{t}}
|
||||
}
|
||||
|
||||
test "SUNION should handle non existing key as empty" {
|
||||
test "SUNION should handle nonexistent key as empty" {
|
||||
r del set1{t} set2{t} set3{t}
|
||||
|
||||
r sadd set1{t} a b c
|
||||
|
|
@ -658,7 +658,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_equal {e} [lsort [r smembers set3{t}]]
|
||||
}
|
||||
|
||||
test "SUNIONSTORE should handle non existing key as empty" {
|
||||
test "SUNIONSTORE should handle nonexistent key as empty" {
|
||||
r del set1{t} set2{t} set3{t}
|
||||
|
||||
r set setres{t} xxx
|
||||
|
|
@ -682,7 +682,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_equal {a b c} [lsort [r smembers set3{t}]]
|
||||
}
|
||||
|
||||
test "SUNIONSTORE against non existing keys should delete dstkey" {
|
||||
test "SUNIONSTORE against nonexistent keys should delete dstkey" {
|
||||
r set setres{t} xxx
|
||||
assert_equal 0 [r sunionstore setres{t} foo111{t} bar222{t}]
|
||||
assert_equal 0 [r exists setres{t}]
|
||||
|
|
@ -818,7 +818,7 @@ foreach type {single multiple single_multiple} {
|
|||
r srandmember myset 0
|
||||
} {}
|
||||
|
||||
test "SRANDMEMBER with <count> against non existing key" {
|
||||
test "SRANDMEMBER with <count> against nonexistent key" {
|
||||
r srandmember nonexisting_key 100
|
||||
} {}
|
||||
|
||||
|
|
@ -834,7 +834,7 @@ foreach type {single multiple single_multiple} {
|
|||
r srandmember myset 0
|
||||
} {*0}
|
||||
|
||||
test "SRANDMEMBER with <count> against non existing key - emptyarray" {
|
||||
test "SRANDMEMBER with <count> against nonexistent key - emptyarray" {
|
||||
r srandmember nonexisting_key 100
|
||||
} {*0}
|
||||
|
||||
|
|
@ -1062,7 +1062,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_equal {3 4} [lsort [r smembers myset2{t}]]
|
||||
}
|
||||
|
||||
test "SMOVE non existing key" {
|
||||
test "SMOVE nonexistent key" {
|
||||
setup_move
|
||||
assert_equal 0 [r smove myset1{t} myset2{t} foo]
|
||||
assert_equal 0 [r smove myset1{t} myset1{t} foo]
|
||||
|
|
@ -1070,13 +1070,13 @@ foreach type {single multiple single_multiple} {
|
|||
assert_equal {2 3 4} [lsort [r smembers myset2{t}]]
|
||||
}
|
||||
|
||||
test "SMOVE non existing src set" {
|
||||
test "SMOVE nonexistent src set" {
|
||||
setup_move
|
||||
assert_equal 0 [r smove noset{t} myset2{t} foo]
|
||||
assert_equal {2 3 4} [lsort [r smembers myset2{t}]]
|
||||
}
|
||||
|
||||
test "SMOVE from regular set to non existing destination set" {
|
||||
test "SMOVE from regular set to nonexistent destination set" {
|
||||
setup_move
|
||||
assert_equal 1 [r smove myset1{t} myset3{t} a]
|
||||
assert_equal {1 b} [lsort [r smembers myset1{t}]]
|
||||
|
|
@ -1084,7 +1084,7 @@ foreach type {single multiple single_multiple} {
|
|||
assert_encoding listpack myset3{t}
|
||||
}
|
||||
|
||||
test "SMOVE from intset to non existing destination set" {
|
||||
test "SMOVE from intset to nonexistent destination set" {
|
||||
setup_move
|
||||
assert_equal 1 [r smove myset2{t} myset3{t} 2]
|
||||
assert_equal {3 4} [lsort [r smembers myset2{t}]]
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ start_server {
|
|||
r XADD "\{lestream\}2" 2-0 k2 v5
|
||||
r XADD "\{lestream\}2" 3-0 k3 v6
|
||||
|
||||
# read last element from 3 streams (2 with enetries, 1 non-existent)
|
||||
# read last element from 3 streams (2 with enetries, 1 nonexistent)
|
||||
# verify the last element from the two existing streams were returned
|
||||
set res [r XREAD STREAMS "\{lestream\}1" "\{lestream\}2" "\{lestream\}3" + + +]
|
||||
assert_equal $res {{{{lestream}1} {{3-0 {k3 v3}}}} {{{lestream}2} {{3-0 {k3 v6}}}}}
|
||||
|
|
@ -902,7 +902,7 @@ start_server {tags {"stream"}} {
|
|||
set err
|
||||
} {ERR *smaller*}
|
||||
|
||||
test {XSETID cannot SETID on non-existent key} {
|
||||
test {XSETID cannot SETID on nonexistent key} {
|
||||
catch {r XSETID stream 1-1} err
|
||||
set _ $err
|
||||
} {ERR no such key}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ start_server {tags {"string"}} {
|
|||
|
||||
test "GETEX syntax errors" {
|
||||
set ex {}
|
||||
catch {r getex foo non-existent-option} ex
|
||||
catch {r getex foo nonexistent-option} ex
|
||||
set ex
|
||||
} {*syntax*}
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ start_server {tags {"string"}} {
|
|||
r mget foo{t} bar{t}
|
||||
} {BAR FOO}
|
||||
|
||||
test {MGET against non existing key} {
|
||||
test {MGET against nonexistent key} {
|
||||
r mget foo{t} baazz{t} bar{t}
|
||||
} {BAR {} FOO}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ start_server {tags {"zset"}} {
|
|||
set err
|
||||
} {ERR*}
|
||||
|
||||
test "ZADD NX with non existing key - $encoding" {
|
||||
test "ZADD NX with nonexistent key - $encoding" {
|
||||
r del ztmp
|
||||
r zadd ztmp nx 10 x 20 y 30 z
|
||||
assert {[r zcard ztmp] == 3}
|
||||
|
|
@ -346,7 +346,7 @@ start_server {tags {"zset"}} {
|
|||
r del ztmp
|
||||
r zadd ztmp 10 a 20 b 30 c
|
||||
assert_equal 3 [r zcard ztmp]
|
||||
assert_equal 0 [r zcard zdoesntexist]
|
||||
assert_equal 0 [r zcard znonexistent]
|
||||
}
|
||||
|
||||
test "ZREM removes key after last element is removed - $encoding" {
|
||||
|
|
@ -1351,7 +1351,7 @@ start_server {tags {"zset"}} {
|
|||
|
||||
r readraw 1
|
||||
|
||||
# ZPOP against non existing key.
|
||||
# ZPOP against nonexistent key.
|
||||
assert_equal {*0} [r zpopmin zset{t}]
|
||||
assert_equal {*0} [r zpopmin zset{t} 1]
|
||||
|
||||
|
|
@ -1419,7 +1419,7 @@ start_server {tags {"zset"}} {
|
|||
|
||||
r readraw 1
|
||||
|
||||
# ZMPOP against non existing key.
|
||||
# ZMPOP against nonexistent key.
|
||||
verify_nil_response $resp [r zmpop 1 zset{t} min]
|
||||
verify_nil_response $resp [r zmpop 1 zset{t} max count 1]
|
||||
verify_nil_response $resp [r zmpop 2 zset{t} zset2{t} min]
|
||||
|
|
@ -2452,7 +2452,7 @@ start_server {tags {"zset"}} {
|
|||
r zrandmember myzset 0
|
||||
} {}
|
||||
|
||||
test "ZRANDMEMBER with <count> against non existing key" {
|
||||
test "ZRANDMEMBER with <count> against nonexistent key" {
|
||||
r zrandmember nonexisting_key 100
|
||||
} {}
|
||||
|
||||
|
|
@ -2470,7 +2470,7 @@ start_server {tags {"zset"}} {
|
|||
r zrandmember myzset 0
|
||||
} {*0}
|
||||
|
||||
test "ZRANDMEMBER with <count> against non existing key - emptyarray" {
|
||||
test "ZRANDMEMBER with <count> against nonexistent key - emptyarray" {
|
||||
r zrandmember nonexisting_key 100
|
||||
} {*0}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue