Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (21 sloc) 567 Bytes
#!/usr/bin/env perl -w
use strict;
use Test::More;
use Cache::Memcached;
use IO::Socket::INET;
my $testaddr = "127.0.0.1:11211";
my $msock = IO::Socket::INET->new(PeerAddr => $testaddr,
Timeout => 3);
if ($msock) {
plan tests => 2;
} else {
plan skip_all => "No memcached instance running at $testaddr\n";
exit 0;
}
my $memd = Cache::Memcached->new({
servers => [ $testaddr ],
});
use utf8;
my $key = "Ïâ";
ok($memd->set($key, "val1"), "set key1 as val1");
is($memd->get($key), "val1", "get key1 is val1");