diff options
Diffstat (limited to 't')
-rw-r--r-- | t/02auto.t | 1 | ||||
-rw-r--r-- | t/TestBackup.pm | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -30,6 +30,7 @@ ok($name, File::Spec->catfile('subdir','a~')); fileok('a', $name); ok(open(FH, '>', File::Spec->catfile('subdir','a.~1~'))); +close FH; $name = backup_copy_auto('a', dir => 'subdir'); ok($name, File::Spec->catfile('subdir','a.~2~')); fileok('a', $name); diff --git a/t/TestBackup.pm b/t/TestBackup.pm index 0679776..72e5925 100644 --- a/t/TestBackup.pm +++ b/t/TestBackup.pm @@ -26,7 +26,7 @@ sub makefile { while ($size) { my $n = @pattern; $n = $size if $n > $size; - syswrite(FH, join('',@pattern[0..$n])) or + syswrite(FH, join('',@pattern[0..$n-1])) or croak "write error creating $file: $!"; $size -= $n; } |