2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- import 'package:archive/archive.dart' ;
6
5
import 'package:file/memory.dart' ;
7
6
import 'package:file/src/interface/file.dart' ;
8
7
import 'package:file_testing/file_testing.dart' ;
@@ -314,7 +313,7 @@ void main() {
314
313
'test message' ,
315
314
Uri .parse ('http:///test.zip' ),
316
315
fileSystem.currentDirectory.childDirectory ('out' ),
317
- ), throwsA (isA <ProcessException >()));
316
+ ), throwsA (isA <Exception >()));
318
317
expect (fileSystem.file ('te,[/test' ), isNot (exists));
319
318
expect (fileSystem.file ('out/test' ), isNot (exists));
320
319
});
@@ -338,7 +337,7 @@ void main() {
338
337
'test message' ,
339
338
Uri .parse ('http:///test.zip' ),
340
339
fileSystem.currentDirectory.childDirectory ('out' ),
341
- ), throwsA (isA <ArchiveException >()));
340
+ ), throwsA (isA <Exception >()));
342
341
expect (fileSystem.file ('te,[/test' ), isNot (exists));
343
342
expect (fileSystem.file ('out/test' ), isNot (exists));
344
343
});
@@ -401,10 +400,7 @@ class MockOperatingSystemUtils extends Mock implements OperatingSystemUtils {
401
400
void unzip (File file, Directory targetDirectory) {
402
401
if (failures > 0 ) {
403
402
failures -= 1 ;
404
- if (windows) {
405
- throw ArchiveException ('zip' );
406
- }
407
- throw const ProcessException ('zip' , < String > [], 'Failed to unzip' );
403
+ throw Exception ();
408
404
}
409
405
targetDirectory.childFile (file.fileSystem.path.basenameWithoutExtension (file.path))
410
406
.createSync ();
@@ -414,10 +410,7 @@ class MockOperatingSystemUtils extends Mock implements OperatingSystemUtils {
414
410
void unpack (File gzippedTarFile, Directory targetDirectory) {
415
411
if (failures > 0 ) {
416
412
failures -= 1 ;
417
- if (windows) {
418
- throw ArchiveException ('zip' );
419
- }
420
- throw const ProcessException ('zip' , < String > [], 'Failed to unzip' );
413
+ throw Exception ();
421
414
}
422
415
targetDirectory.childFile (gzippedTarFile.fileSystem.path.basenameWithoutExtension (gzippedTarFile.path))
423
416
.createSync ();
0 commit comments