Skip to content

Commit d3e622f

Browse files
committed
Update tests, add in macfat test.
1 parent c6613ae commit d3e622f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/runtests.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ using Compat, Compat.Test
33

44
function 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
154154
test_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
157163
test_libfoo_and_fooifier("./win32/fooifier.exe", "./win32/libfoo.dll")
158164
test_libfoo_and_fooifier("./win64/fooifier.exe", "./win64/libfoo.dll")

0 commit comments

Comments
 (0)