diff options
author | Wen Hui <wen.hui.ware@gmail.com> | 2023-05-07 04:46:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 11:46:11 +0300 |
commit | 42dd98ec191fd71528785bd7d31bd18112078f66 (patch) | |
tree | d7f708cb3e5ee701bd92f1ea71baabbb9181fbec | |
parent | ce5f4ea3a9f4afe1c43079c93d0ff6bf6b04597a (diff) | |
download | redis-42dd98ec191fd71528785bd7d31bd18112078f66.tar.gz |
adding missing test cases GET and GETEX (#12125)
adding test case of expired key or not exist for GET and GETEX.
for better test coverage.
-rw-r--r-- | tests/unit/type/string.tcl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/type/string.tcl b/tests/unit/type/string.tcl index 7a5d56f82..68c360b97 100644 --- a/tests/unit/type/string.tcl +++ b/tests/unit/type/string.tcl @@ -151,6 +151,14 @@ start_server {tags {"string"}} { set ex } {*syntax*} + test "GETEX and GET expired key or not exist" { + r del foo + r set foo bar px 1 + after 2 + assert_equal {} [r getex foo] + assert_equal {} [r get foo] + } + test "GETEX no arguments" { set ex {} catch {r getex} ex |