/[Redis.pre-github]/t/10-Redis-List.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /t/10-Redis-List.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 39 - (show annotations)
Sun Mar 22 18:18:26 2009 UTC (15 years ago) by dpavlin
File MIME type: application/x-troff
File size: 487 byte(s)
cleanup fails on empty database
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use Test::More tests => 8;
7 use lib 'lib';
8 use Data::Dump qw/dump/;
9
10 BEGIN {
11 use_ok( 'Redis::List' );
12 }
13
14 my @a;
15
16 ok( my $o = tie( @a, 'Redis::List', 'test-redis-list' ), 'tie' );
17
18 isa_ok( $o, 'Redis::List' );
19
20 $o->CLEAR;
21
22 ok( ! @a, 'empty list' );
23
24 ok( @a = ( 'foo', 'bar', 'baz' ), '=' );
25 is_deeply( [ @a ], [ 'foo', 'bar', 'baz' ] );
26
27 ok( push( @a, 'push' ), 'push' );
28 is_deeply( [ @a ], [ 'foo', 'bar', 'baz', 'push' ] );
29
30 diag dump( @a );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26