/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49 - (hide annotations)
Mon Mar 23 11:38:56 2009 UTC (15 years ago) by dpavlin
File MIME type: application/x-troff
File size: 488 byte(s)
comment debug output

1 dpavlin 29 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6 dpavlin 39 use Test::More tests => 8;
7 dpavlin 29 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 dpavlin 39 $o->CLEAR;
21 dpavlin 29
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 dpavlin 49 #diag dump( @a );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26