@@ -2285,6 +2285,7 @@ def check_extract_weird_names(
2285
2285
test_file = self .get_test_loc (test_file )
2286
2286
test_dir = self .get_temp_dir ()
2287
2287
2288
+ warnings = []
2288
2289
try :
2289
2290
warnings = test_function (test_file , test_dir )
2290
2291
except Exception as e :
@@ -2538,8 +2539,26 @@ def test_extract_rar_with_weird_filenames_with_sevenzip_macos(self):
2538
2539
2539
2540
def test_extract_iso_with_weird_filenames_with_sevenzip_macos (self ):
2540
2541
test_file = self .get_test_loc ('archive/weird_names/weird_names.iso' )
2542
+ expected_exception = {
2543
+ 'weird_names/man_1/[.1.gz' : 'Empty archive or incorrect arguments' ,
2544
+ 'weird_names/man_1/[___.1' : 'Empty archive or incorrect arguments' ,
2545
+ "weird_names/some 'file" : 'Empty archive or incorrect arguments' ,
2546
+ 'weird_names/some _file' : 'Empty archive or incorrect arguments' ,
2547
+ 'weird_names/some file' : 'Empty archive or incorrect arguments' ,
2548
+ 'weird_names/some"file' : 'Empty archive or incorrect arguments' ,
2549
+ 'weird_names/some_"file' : 'Empty archive or incorrect arguments' ,
2550
+ 'weird_names/winchr/ab".t"' : 'Empty archive or incorrect arguments' ,
2551
+ 'weird_names/winchr/ab<.t<' : 'Empty archive or incorrect arguments' ,
2552
+ 'weird_names/winchr/ab>.t>' : 'Empty archive or incorrect arguments' ,
2553
+ 'weird_names/winchr/ab|.t|' : 'Empty archive or incorrect arguments'
2554
+ }
2555
+
2541
2556
self .check_extract_weird_names (
2542
- sevenzip .extract , test_file , expected_warnings = [], expected_suffix = '7zip' )
2557
+ sevenzip .extract ,
2558
+ test_file ,
2559
+ expected_warnings = [],
2560
+ expected_suffix = '7zip' ,
2561
+ expected_exception = expected_exception )
2543
2562
2544
2563
def test_extract_tar_with_weird_filenames_with_sevenzip_macos (self ):
2545
2564
test_file = self .get_test_loc ('archive/weird_names/weird_names.tar' )
0 commit comments