~yolanda.robla/ubuntu/trusty/memcached/add_distribution

« back to all changes in this revision

Viewing changes to t/issue_61.t

  • Committer: Bazaar Package Importer
  • Author(s): David Martínez Moreno
  • Date: 2009-08-01 23:26:45 UTC
  • mto: (3.3.1 squeeze) (1.4.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20090801232645-g57xdaf3zal53qcl
Tags: upstream-1.4.0
Import upstream version 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use strict;
 
4
use Test::More tests => 7;
 
5
use FindBin qw($Bin);
 
6
use lib "$Bin/lib";
 
7
use MemcachedTest;
 
8
 
 
9
my $server = new_memcached("-R 1");
 
10
my $sock = $server->sock;
 
11
 
 
12
print $sock "set foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\nset foobar 0 0 5\r\nBubba\r\n";
 
13
is (scalar <$sock>, "STORED\r\n", "stored foobar");
 
14
is (scalar <$sock>, "STORED\r\n", "stored foobar");
 
15
is (scalar <$sock>, "STORED\r\n", "stored foobar");
 
16
is (scalar <$sock>, "STORED\r\n", "stored foobar");
 
17
is (scalar <$sock>, "STORED\r\n", "stored foobar");
 
18
is (scalar <$sock>, "STORED\r\n", "stored foobar");
 
19
my $stats = mem_stats($sock);
 
20
is ($stats->{"conn_yields"}, "5", "Got a decent number of yields");