Mercurial > hg > memcached
comparison t/binary-get.t @ 0:30782bb1fc04 MEMCACHED_1_2_3
memcached-1.2.3
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 23 Sep 2007 03:58:34 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:30782bb1fc04 |
---|---|
1 #!/usr/bin/perl | |
2 | |
3 use strict; | |
4 use Test::More tests => 8; | |
5 use FindBin qw($Bin); | |
6 use lib "$Bin/lib"; | |
7 use MemcachedTest; | |
8 | |
9 my $server = new_memcached(); | |
10 my $sock = $server->sock; | |
11 | |
12 my $count = 1; | |
13 | |
14 foreach my $blob ("mooo\0", "mumble\0\0\0\0\r\rblarg", "\0", "\r") { | |
15 my $key = "foo$count"; | |
16 my $len = length($blob); | |
17 print "len is $len\n"; | |
18 print $sock "set $key 0 0 $len\r\n$blob\r\n"; | |
19 is(scalar <$sock>, "STORED\r\n", "stored $key"); | |
20 mem_get_is($sock, $key, $blob); | |
21 $count++; | |
22 } | |
23 |