Skip to content

Instantly share code, notes, and snippets.

@otterley
Created December 15, 2010 18:03
Show Gist options
  • Save otterley/742355 to your computer and use it in GitHub Desktop.
Save otterley/742355 to your computer and use it in GitHub Desktop.
latin1 test
use strict;
use Test::More;
use t::Redis;
test_redis {
my $r = shift;
$r->{encoding} = 'utf8';
$r->all_cv->begin(sub { $_[0]->send });
my $info = $r->info->recv;
is ref $info, 'HASH';
ok $info->{redis_version};
my $key = "Vögel";
my $val = "Grüe";
$r->set($key => $val, sub { pass "SET" });
$r->get($key, sub {
is $_[0], $val, "GET";
});
$r->all_cv->end;
$r->all_cv->recv;
};
done_testing;
# vim:fileencoding=latin1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment