We are not round-tripping utf-8 encoding strings correctly in
this version. We will get string back wothout perl utf-8 flag
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/Redis@69
447b33ff-793d-4489-8442-
9bea7d161be5
sub AUTOLOAD {
my $self = shift;
sub AUTOLOAD {
my $self = shift;
my $sock = $self->{sock} || die "no server connected";
my $command = $AUTOLOAD;
my $sock = $self->{sock} || die "no server connected";
my $command = $AUTOLOAD;
use warnings;
use strict;
use warnings;
use strict;
-use Test::More tests => 108;
+use Test::More tests => 110;
use Data::Dumper;
use lib 'lib';
use Data::Dumper;
use lib 'lib';
cmp_ok( $o->get( 'foo' ), 'eq', 'baz', 'get foo = baz' );
cmp_ok( $o->get( 'foo' ), 'eq', 'baz', 'get foo = baz' );
+my $euro = "\x{20ac}";
+ok( $o->set( utf8 => $euro ), 'set utf8' );
+cmp_ok( $o->get( 'utf8' ), 'eq', $euro, 'get utf8' );
+
ok( $o->set( 'test-undef' => 42 ), 'set test-undef' );
ok( $o->set( 'test-undef' => undef ), 'set undef' );
ok( ! defined $o->get( 'test-undef' ), 'get undef' );
ok( $o->set( 'test-undef' => 42 ), 'set test-undef' );
ok( $o->set( 'test-undef' => undef ), 'set undef' );
ok( ! defined $o->get( 'test-undef' ), 'get undef' );