Skip to content

Commit 28df015

Browse files
authored
Merge pull request #24 from staticfloat/sf/empty_files
2 parents eb96ff2 + b320779 commit 28df015

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/runtests.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
using ObjectFile
22
using Test
33

4+
@testset "basic" begin
5+
# Test that an empty file is a magic mismatch
6+
mktempdir() do dir
7+
fpath = joinpath(dir, "empty")
8+
touch(fpath)
9+
@test_throws MagicMismatch readmeta(fpath) do oh
10+
@test false
11+
end
12+
end
13+
end
14+
415
function test_libfoo_and_fooifier(fooifier_path, libfoo_path)
516
# Actually read it in
617
oh_exe = readmeta(open(fooifier_path, "r"))

0 commit comments

Comments
 (0)