/[Frey]/trunk/t/30-Frey-Shell-Log.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

Diff of /trunk/t/30-Frey-Shell-Log.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 894 by dpavlin, Wed Dec 24 21:42:20 2008 UTC revision 895 by dpavlin, Wed Dec 24 22:02:45 2008 UTC
# Line 4  use warnings; Line 4  use warnings;
4    
5  my $debug = @ARGV ? 1 : 0;  my $debug = @ARGV ? 1 : 0;
6    
7  use Test::More tests => 5;  use Test::More tests => 6;
8  use lib 'lib';  use lib 'lib';
9    
10  BEGIN {  BEGIN {
11          use_ok('Frey::Shell::Log');          use_ok('Frey::Shell::Log');
12  }  }
13    
14  ok( my $o = Frey::Shell::Log->new( request_url => '/', debug => $debug ), 'new' );  ok( my $o = Frey::Shell::Log->new( log_command => 'tail -5 /var/log/daemon.log', request_url => '/', debug => $debug ), 'new' );
15  ok( my $sponge = $o->as_sponge, 'as_sponge' );  ok( my $sponge = $o->as_sponge, 'as_sponge' );
16  diag $o->dump( $sponge ) if $debug;  diag $o->dump( $sponge ) if $debug;
17  ok( $sponge->{rows}, 'rows' );  ok( $sponge->{rows}, 'rows' );
18    is( scalar @{ $sponge->{rows} }, 5, 'rows correct' );
19  ok( $sponge->{NAME}, 'NAME' );  ok( $sponge->{NAME}, 'NAME' );
20    

Legend:
Removed from v.894  
changed lines
  Added in v.895

  ViewVC Help
Powered by ViewVC 1.1.26