/[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 63 - (hide annotations)
Mon Sep 14 11:37:25 2009 UTC (10 years ago) by dpavlin
File MIME type: application/x-troff
File size: 445 byte(s)
use Data::Dumper instead of Data::Dump so all our dependencies are perl core modules
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    
9     BEGIN {
10     use_ok( 'Redis::List' );
11     }
12    
13     my @a;
14    
15     ok( my $o = tie( @a, 'Redis::List', 'test-redis-list' ), 'tie' );
16    
17     isa_ok( $o, 'Redis::List' );
18    
19 dpavlin 39 $o->CLEAR;
20 dpavlin 29
21     ok( ! @a, 'empty list' );
22    
23     ok( @a = ( 'foo', 'bar', 'baz' ), '=' );
24     is_deeply( [ @a ], [ 'foo', 'bar', 'baz' ] );
25    
26     ok( push( @a, 'push' ), 'push' );
27     is_deeply( [ @a ], [ 'foo', 'bar', 'baz', 'push' ] );
28    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26