"Fossies" - the Fresh Open Source Software Archive

Member "memcached-1.6.15/t/issue_68.t" (16 Jul 2020, 505 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 => 996;
    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 for (my $keyi = 1; $keyi < 250; $keyi++) {
   13     my $key = "x" x $keyi;
   14     print $sock "set $key 0 0 1\r\n9\r\n";
   15     is (scalar <$sock>, "STORED\r\n", "stored $key");
   16     mem_get_is($sock, $key, "9");
   17     print $sock "incr $key 1\r\n";
   18     is (scalar <$sock>, "10\r\n", "incr $key to 10");
   19     mem_get_is($sock, $key, "10");
   20 }
   21