"Fossies" - the Fresh Open Source Software Archive

Member "memcached-1.6.15/t/flags.t" (16 Jul 2020, 463 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 => 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 # set foo (and should get it)
   13 for my $flags (0, 123, 2**16-1, 2**31) {
   14     print $sock "set foo $flags 0 6\r\nfooval\r\n";
   15     is(scalar <$sock>, "STORED\r\n", "stored foo");
   16     mem_get_is({ sock => $sock,
   17                  flags => $flags }, "foo", "fooval", "got flags $flags back");
   18 }