From 42dd98ec191fd71528785bd7d31bd18112078f66 Mon Sep 17 00:00:00 2001 From: Wen Hui Date: Sun, 7 May 2023 04:46:11 -0400 Subject: 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. --- tests/unit/type/string.tcl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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 -- cgit v1.2.1