]> git.saurik.com Git - redis.git/blame - client-libraries/perl/t/10-Redis-List.t
New file dump format, perl client library added
[redis.git] / client-libraries / perl / t / 10-Redis-List.t
CommitLineData
f78fd11b 1#!/usr/bin/perl
2
3use warnings;
4use strict;
5
6use Test::More tests => 8;
7use lib 'lib';
8use Data::Dump qw/dump/;
9
10BEGIN {
11 use_ok( 'Redis::List' );
12}
13
14my @a;
15
16ok( my $o = tie( @a, 'Redis::List', 'test-redis-list' ), 'tie' );
17
18isa_ok( $o, 'Redis::List' );
19
20$o->CLEAR;
21
22ok( ! @a, 'empty list' );
23
24ok( @a = ( 'foo', 'bar', 'baz' ), '=' );
25is_deeply( [ @a ], [ 'foo', 'bar', 'baz' ] );
26
27ok( push( @a, 'push' ), 'push' );
28is_deeply( [ @a ], [ 'foo', 'bar', 'baz', 'push' ] );
29
30#diag dump( @a );