"Fossies" - the Fresh Open Source Software Archive

Member "memcached-1.6.15/t/issue_29.t" (16 Jul 2020, 631 Bytes) of package /linux/www/memcached-1.6.15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl
    2 
    3 use strict;
    4 use Test::More tests => 4;
    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 print $sock "set issue29 0 0 0\r\n\r\n";
   13 is (scalar <$sock>, "STORED\r\n", "stored issue29");
   14 
   15 my $first_stats  = mem_stats($sock, "slabs");
   16 my $first_used = $first_stats->{"1:used_chunks"};
   17 
   18 is(1, $first_used, "Used one");
   19 
   20 print $sock "set issue29_b 0 0 0\r\n\r\n";
   21 is (scalar <$sock>, "STORED\r\n", "stored issue29_b");
   22 
   23 my $second_stats  = mem_stats($sock, "slabs");
   24 my $second_used = $second_stats->{"1:used_chunks"};
   25 
   26 is(2, $second_used, "Used two")