sinter
[perl-Redis.git] / t / 01-Redis.t
index 96f143c..3fb3565 100755 (executable)
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 
 use warnings;
 use strict;
 
-use Test::More tests => 83;
+use Test::More tests => 84;
 
 use lib 'lib';
 
 
 use lib 'lib';
 
@@ -131,4 +131,9 @@ ok( $o->srem( $set, 'foo' ), 'srem' );
 ok( ! $o->srem( $set, 'foo' ), 'srem again' );
 cmp_ok( $o->scard( $set ), '==', 0, 'scard' );
 
 ok( ! $o->srem( $set, 'foo' ), 'srem again' );
 cmp_ok( $o->scard( $set ), '==', 0, 'scard' );
 
+$o->sadd( 'test-set1', $_ ) foreach ( 'foo', 'bar', 'baz' );
+$o->sadd( 'test-set2', $_ ) foreach ( 'foo', 'baz', 'xxx' );
+
+is_deeply( [ $o->sinter( 'test-set1', 'test-set2' ) ], [ 'baz', 'foo' ], 'siter' );
+
 ok( $o->quit, 'quit' );
 ok( $o->quit, 'quit' );