/[pxelator]/lib/PXElator/t/file.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

Annotation of /lib/PXElator/t/file.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 277 - (hide annotations)
Thu Aug 20 19:00:13 2009 UTC (14 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 651 byte(s)
put all customization above debootstrap into rw overlay
(aufs branch), record mounted variations correctly

1 dpavlin 271 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5     use autodie;
6    
7 dpavlin 277 use Test::More tests => 11;
8 dpavlin 271 use Data::Dump qw/dump/;
9    
10     use_ok 'file';
11    
12     my $file = '/tmp/test';
13    
14     ok( ! -e $file, "$file doesn't exist" );
15     ok( file::append( $file, 'test' ), 'append' );
16     ok( my $size = -s $file, "size" );
17     ok( ! file::append( $file, 'test' ), 'append again' );
18     cmp_ok( -s $file, '==', $size, 'size not changed' );
19    
20     ok( file::change( $file, 'test' => 'foobar' ), 'change' );
21     cmp_ok( -s $file, '>', $size, 'size bigger' );
22     ok( ! file::change( $file, 'test' => 'foobar' ), 'change again' );
23    
24 dpavlin 277 ok( file::replace( $file, 'replaced content' ), 'replace' );
25    
26 dpavlin 271 ok( unlink($file), 'unlink' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26