From 8a9d19e08aea07be760882d629fa90f4ab7c2da3 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 30 Jan 2026 22:41:30 +0800 Subject: detect ape format --- tests/modules/binutils/test.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/modules/binutils') diff --git a/tests/modules/binutils/test.lua b/tests/modules/binutils/test.lua index 363bf073b..543131c7f 100644 --- a/tests/modules/binutils/test.lua +++ b/tests/modules/binutils/test.lua @@ -14,6 +14,18 @@ function test_format(t) io.writefile(scriptfile, "#!/bin/sh\nexit 0\n") t:are_equal(binutils.format(scriptfile), "shebang") + local apefile = path.join(tempdir, "a.ape") + io.writefile(apefile, "MZqFpD00") + t:are_equal(binutils.format(apefile), "ape") + + local apecom = path.join(tempdir, "a.com") + io.writefile(apecom, "MZqFpD00") + t:are_equal(binutils.format(apecom), "ape") + + local comfile = path.join(tempdir, "b.com") + io.writefile(comfile, "12345678") + t:are_equal(binutils.format(comfile), "unknown") + local programfile = os.programfile() if programfile then local expected = "elf" -- cgit v1.3.1