Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fdef3a9760
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 40 lines (26 sloc) 0.854 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#!/usr/bin/env perl

use strict;
use warnings;
use utf8;
use lib 't';

use Test::More;

# ABSTRACT: Tests for the Redis MGET command.

use_ok 'RedisClientTest';

my $redis = RedisClientTest->server;
done_testing && exit unless $redis;

isa_ok $redis, 'Redis::Client';

$redis->set( perl_redis_test_mget_1 => 'foo' );
$redis->set( perl_redis_test_mget_2 => 'bar' );
$redis->set( perl_redis_test_mget_3 => 'baz' );

my @vals = $redis->mget( 'perl_redis_test_mget_1',
                         'perl_redis_test_blargh',
                         'perl_redis_test_mget_2',
                         'perl_redis_test_mget_3' );

is $vals[0], 'foo';
is $vals[1], undef;
is $vals[2], 'bar';
is $vals[3], 'baz';

ok $redis->del( 'perl_redis_test_mget_1' );
ok $redis->del( 'perl_redis_test_mget_2' );
ok $redis->del( 'perl_redis_test_mget_3' );


done_testing;

Something went wrong with that request. Please try again.