File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ using Compat, Compat.Test
33
44function test_libfoo_and_fooifier (fooifier_path, libfoo_path)
55 # Actually read it in
6- oh_exe = readmeta (fooifier_path)
7- oh_lib = readmeta (libfoo_path)
6+ oh_exe = readmeta (open ( fooifier_path, " r " ) )
7+ oh_lib = readmeta (open ( libfoo_path, " r " ) )
88
99 # Tease out some information from the containing folder name
1010 dir_path = basename (dirname (libfoo_path))
@@ -153,6 +153,12 @@ test_libfoo_and_fooifier("./linux64/fooifier", "./linux64/libfoo.so")
153153# Run MachO tests
154154test_libfoo_and_fooifier (" ./mac64/fooifier" , " ./mac64/libfoo.dylib" )
155155
156+ # Ensure that fat Mach-O files don't look like anything to us
157+ @testset " macfat" begin
158+ @test_throws ObjectFile. MagicMismatch readmeta (open (" ./macfat/fooifier" ," r" ))
159+ @test_throws ObjectFile. MagicMismatch readmeta (open (" ./macfat/libfoo.dylib" ," r" ))
160+ end
161+
156162# Run COFF tests
157163test_libfoo_and_fooifier (" ./win32/fooifier.exe" , " ./win32/libfoo.dll" )
158164test_libfoo_and_fooifier (" ./win64/fooifier.exe" , " ./win64/libfoo.dll" )
You can’t perform that action at this time.
0 commit comments