make saerch query param to test script
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 18 Apr 2012 12:59:47 +0000 (14:59 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 18 Apr 2012 12:59:47 +0000 (14:59 +0200)
t/3-GoogleBooks.t

index 62156d0..0266d08 100755 (executable)
@@ -5,11 +5,13 @@ use strict;
 
 use Test::More tests => 14;
 
+my $search = join(' ', @ARGV) || 'croatia';
+
 use_ok 'GoogleBooks';
 
 ok( my $o = GoogleBooks->new(), 'new' );
 
-ok( my $hits = $o->search( 'croatia' ), 'search' );
+ok( my $hits = $o->search( $search ), "search: $search" );
 like $hits, qr/^\d+$/, "hits: $hits";
 
 foreach ( 1 .. 10 ) {