diff options
Diffstat (limited to 'tests/modules/os/test.lua')
| -rw-r--r-- | tests/modules/os/test.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/modules/os/test.lua b/tests/modules/os/test.lua index 71e9d610d..2dcab35c6 100644 --- a/tests/modules/os/test.lua +++ b/tests/modules/os/test.lua @@ -188,9 +188,17 @@ function test_isexec(t) io.writefile(batfile, "echo test\r\n") t:require(os.isexec(batfile)) + local comfile = path.join(tempdir, "a.com") + io.writefile(comfile, "12345678") + t:require(os.isexec(comfile)) + local suffix = path.join(tempdir, "prog") io.writefile(suffix .. ".exe", "") t:require(os.isexec(suffix)) + + local suffix2 = path.join(tempdir, "prog2") + io.writefile(suffix2 .. ".com", "") + t:require(os.isexec(suffix2)) else os.vrunv("chmod", {"-x", filepath}) t:require_not(os.isexec(filepath)) |
