Changeset 72
- Timestamp:
- 11/29/05 21:32:17 (19 years ago)
- Location:
- trunk/soft/ObsData
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/soft/ObsData/ObsData/Archive/Compressed.pm
- Property cvs2svn:cvs-rev changed from 1.3 to 1.4
r20 r72 56 56 } 57 57 58 open(my $sourcefh, "$self->{uncomp} '$self->{archive}' |") or return undef;58 open(my $sourcefh, "$self->{uncomp} '$self->{archive}' 2>/dev/null |") or return undef; 59 59 60 60 if(!copy($sourcefh, $fh)) { … … 64 64 } 65 65 66 close($sourcefh);67 66 close($fh); 67 if(!close($sourcefh)) { 68 $self->seterror("$self->{uncomp} exit with error" . ($! ? (" " . $!) : "")); 69 unlink($fname); 70 return undef; 71 } 68 72 $fname 69 73 } -
trunk/soft/ObsData/t/OA-03.t
- Property cvs2svn:cvs-rev changed from 1.1 to 1.2
r12 r72 1 1 # $Id$ 2 2 3 use Test::More tests => 4;3 use Test::More tests => 6; 4 4 use ObsData::Archive; 5 5 use File::Temp qw(tempdir); 6 6 7 7 my $tempdir = tempdir; 8 print $tempdir . "\n";9 8 10 9 my $oa = ObsData::Archive->new('testdata/coin.gz'); … … 17 16 ok(-r "$tempdir/coin", "the file has been really extract"); 18 17 18 $oa = ObsData::Archive->new('testdata/wrongcoin.gz'); 19 ok(!$oa->extract('wrongcoin', "$tempdir/coin"), "Get an error if extraction failed"); 20 ok($oa->error, "Can get error"); 21 19 22 system(qw(rm -fr), $tempdir);
Note: See TracChangeset
for help on using the changeset viewer.