/[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 27 by dpavlin, Tue Jul 10 00:22:00 2007 UTC revision 32 by dpavlin, Sun Jul 15 23:52:55 2007 UTC
# Line 30  sub file { Line 30  sub file {
30          my $orig_size = -s "$to/$path";          my $orig_size = -s "$to/$path";
31          ok( open( my $fh, $op, "$to/$path" ), "open( $op $path )");          ok( open( my $fh, $op, "$to/$path" ), "open( $op $path )");
32          if ( $op eq '>' ) {          if ( $op eq '>' ) {
33                  cmp_ok( -s "$to/$path", '==', 0, "truncate $to/$path" );                  cmp_ok( -s "$to/$path", '==', 0, "truncated $to/$path"  );
34                  print $fh $content;                  print $fh $content;
35          } elsif ( $op eq '>>' ) {          } elsif ( $op eq '>>' ) {
36                  cmp_ok( -s "$to/$path", '==', $orig_size, "no truncate $to/$path" );                  cmp_ok( -s "$to/$path", '==', $orig_size, "no truncate $to/$path" );
# Line 63  sub file { Line 63  sub file {
63                  ok( -e "$tmp/$path" , "in tmp $tmp/$path" ) if ( $op eq '<' );                  ok( -e "$tmp/$path" , "in tmp $tmp/$path" ) if ( $op eq '<' );
64                  # check total size if not append                  # check total size if not append
65                  if ( $op ne '>>' ) {                  if ( $op ne '>>' ) {
66                          cmp_ok( -s $pack, '==', $size, "$tmp/$path = $size bytes" );                          cmp_ok( -s $pack, '<', $size, "$pack < $size bytes" );
67                  }                  }
68          } else {          } else {
69                  ok( -e "$from/$path", "on disk $from/$path" );                  ok( -e "$from/$path", "on disk $from/$path" );
# Line 143  sub multiple_rw { Line 143  sub multiple_rw {
143          cmp_ok( (stat("$to/m"))[3], '==', 1, 'no links' );          cmp_ok( (stat("$to/m"))[3], '==', 1, 'no links' );
144    
145          my @sizes;          my @sizes;
146          my $size = 65536;          $size = 65536;
147          while ( $size > 1 ) {          while ( $size > 1 ) {
148                  push @sizes, $size;                  push @sizes, $size;
149                  $size /= 2;                  $size /= 2;

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

  ViewVC Help
Powered by ViewVC 1.1.26