/[fuse-comp]/t/fs.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 /t/fs.t

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

revision 25 by dpavlin, Mon Jul 9 22:44:20 2007 UTC revision 27 by dpavlin, Tue Jul 10 00:22:00 2007 UTC
# Line 4  use warnings; Line 4  use warnings;
4    
5  my $debug = shift @ARGV;  my $debug = shift @ARGV;
6    
7  use Test::More tests => 744;  use Test::More tests => 766;
8  use File::Slurp;  use File::Slurp;
9  use IO::File;  use IO::File;
10    
# Line 127  sub multiple_rw { Line 127  sub multiple_rw {
127          ok( close($fh2), 'close 2' );          ok( close($fh2), 'close 2' );
128          dump_debug 'closed';          dump_debug 'closed';
129    
130            ok( symlink("$to/m", "$to/s"), 'symlink' );
131            ok( -l "$to/s", 'is symlink' );
132            ok( link("$to/m", "$to/l"), 'link' );
133            cmp_ok( (stat("$to/l"))[3], '==', 2, 'l has 2 links' );
134            cmp_ok( (stat("$to/m"))[3], '==', 2, 'm has 2 links' );
135    
136            my $size = -s "$to/m";
137            cmp_ok( length(read_file("$to/s")), '==', $size, "$to/s size $size" );
138            cmp_ok( length(read_file("$to/l")), '==', $size, "$to/l size $size" );
139    
140            ok( unlink("$to/s"), 'unlink s' );
141            ok( ! -e "$to/s", 'gone' );
142            ok( unlink("$to/l"), 'unlink l' );
143            cmp_ok( (stat("$to/m"))[3], '==', 1, 'no links' );
144    
145          my @sizes;          my @sizes;
146          my $size = 65536;          my $size = 65536;
147          while ( $size > 1 ) {          while ( $size > 1 ) {
# Line 172  sub multiple_rw { Line 187  sub multiple_rw {
187                  dump_debug 'hidden';                  dump_debug 'hidden';
188                  ok( print($fh1 "foobar"), "print to hidden" );                  ok( print($fh1 "foobar"), "print to hidden" );
189                  ok( close($fh1), "close $to/h" );                  ok( close($fh1), "close $to/h" );
                 diag $!;  
190          }          }
191  }  }
192    
193  multiple_rw;  multiple_rw;
194  multiple_rw;  multiple_rw;
195    
   

Legend:
Removed from v.25  
changed lines
  Added in v.27

  ViewVC Help
Powered by ViewVC 1.1.26