diff options
author | minkikim89 <minkikim89@gmail.com> | 2020-03-12 13:27:59 +0100 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-03-12 12:52:16 -0700 |
commit | 1e8d02e546a860d539d9b550ab23c4567a129f14 (patch) | |
tree | a954a3c08f31a77d84ebc62e6669a488a609e949 /t/expirations.t | |
parent | 71d4fa81ef681444b8a3f95db1ceea3fdf5e87ec (diff) | |
download | memcached-1e8d02e546a860d539d9b550ab23c4567a129f14.tar.gz |
Add negative expiration time case to expiration test
Diffstat (limited to 't/expirations.t')
-rwxr-xr-x | t/expirations.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/expirations.t b/t/expirations.t index 7b5aaec..de7adb9 100755 --- a/t/expirations.t +++ b/t/expirations.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use Test::More tests => 15; +use Test::More tests => 17; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; @@ -53,6 +53,11 @@ print $sock "set boo 0 $expire 6\r\nbooval\r\n"; is(scalar <$sock>, "STORED\r\n", "stored boo"); mem_get_is($sock, "boo", undef, "now expired"); +$expire = -1; +print $sock "set boo 0 $expire 6\r\nbooval\r\n"; +is(scalar <$sock>, "STORED\r\n", "stored boo"); +mem_get_is($sock, "boo", undef, "now expired"); + print $sock "add add 0 2 6\r\naddval\r\n"; is(scalar <$sock>, "STORED\r\n", "stored add"); mem_get_is($sock, "add", "addval"); |