diff options
| author | ruki <[email protected]> | 2026-01-30 22:39:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-30 22:39:36 +0800 |
| commit | 9b87a6b6885d004d445f021b9536d08a18225351 (patch) | |
| tree | 6c2a84c75566e37157b91363ece45dd5f5ca9faa /tests/modules/binutils/test.lua | |
| parent | c50a3cb891f78c187c8bd862a7e0c3ee9b65d1c4 (diff) | |
detect shebang format
Diffstat (limited to 'tests/modules/binutils/test.lua')
| -rw-r--r-- | tests/modules/binutils/test.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modules/binutils/test.lua b/tests/modules/binutils/test.lua index 78acb044c..363bf073b 100644 --- a/tests/modules/binutils/test.lua +++ b/tests/modules/binutils/test.lua @@ -10,6 +10,10 @@ function test_format(t) local format = binutils.format(unknown) t:are_equal(format, "unknown") + local scriptfile = path.join(tempdir, "a.sh") + io.writefile(scriptfile, "#!/bin/sh\nexit 0\n") + t:are_equal(binutils.format(scriptfile), "shebang") + local programfile = os.programfile() if programfile then local expected = "elf" |
