/[webpac2]/trunk/t/5-output-sorted.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/5-output-sorted.t

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

revision 948 by dpavlin, Wed Oct 31 12:17:11 2007 UTC revision 949 by dpavlin, Thu Nov 1 00:16:48 2007 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
 use Test::More tests => 16;  
 use Test::Exception;  
 use Cwd qw/abs_path/;  
 use Data::Dump qw/dump/;  
 use blib;  
3  use strict;  use strict;
4    use blib;
5    
6    use Test::More tests => 16;
7    
8  BEGIN {  BEGIN {
9    use_ok( 'WebPAC::Test' );
10  use_ok( 'WebPAC::Output::Sorted' );  use_ok( 'WebPAC::Output::Sorted' );
11  }  }
12    
 my $debug = shift @ARGV;  
   
 ok(my $abs_path = abs_path($0), "abs_path");  
 $abs_path =~ s#/[^/]*$#/#; #  
 diag "abs_path: $abs_path";  
13  my $path = "$abs_path/sorted/";  my $path = "$abs_path/sorted/";
14    
15  ok(my $out = new WebPAC::Output::Sorted({  ok(my $out = new WebPAC::Output::Sorted({
16          path => $path,          path => $path,
17          database => 'test',          database => 'test',
18          clean => 1,          clean => 1,
19          debug => $debug,          %LOG
20  }), "new");  }), "new");
21    
22  ok( $out->init, 'init' );  ok( $out->init, 'init' );
# Line 51  ok( $out->add( 100, { foo => { sorted => Line 45  ok( $out->add( 100, { foo => { sorted =>
45    
46  ok( -e $out->path, "created $path" );  ok( -e $out->path, "created $path" );
47    
48  diag $out->path," eq ",$path;  diag $out->path," eq ",$path if $debug;
49  cmp_ok( $out->path, 'eq', $path, 'path' );  cmp_ok( $out->path, 'eq', $path, 'path' );
50    
51  ok( $out->finish, 'finish' );  ok( $out->finish, 'finish' );

Legend:
Removed from v.948  
changed lines
  Added in v.949

  ViewVC Help
Powered by ViewVC 1.1.26