source: t/key_ref.t @ 9f3297

Revision 9f3297, 552 bytes checked in by Tomash Brechko <tomash.brechko@…>, 4 years ago (diff)

Split the test case.

  • Property mode set to 100644
Line 
1use warnings;
2use strict;
3
4use Test::More;
5
6use FindBin;
7
8use lib "$FindBin::Bin";
9use Memd;
10
11if ($Memd::memd) {
12    plan tests => 5;
13} else {
14    plan skip_all => 'Not connected';
15}
16
17
18my $key = "key_ref";
19my $value = "value ref check";
20ok($Memd::memd->set($key, $value), 'Store');
21my $h = $Memd::memd->get_multi($key);
22is($h->{$key}, $value, 'Fetch');
23
24my $old_key = $key;
25substr($key, 3, 4, "");
26is($h->{$old_key}, $value, 'Access with the old key');
27ok(! exists $h->{$key}, 'Access with modified key');
28
29ok($Memd::memd->delete($old_key), 'Delete');
Note: See TracBrowser for help on using the repository browser.