Add lush feature tests and fix /dev/full test for macOS

Add test suite under testes/lush/ covering backtick commands, argv
parsing, ${} interpolation, and $NAME environment variables. Wire
them into testes/all.lua so they run with the full Lua 5.5 suite.

Skip /dev/full test in files.lua when the device doesn't exist
(macOS has no /dev/full).
This commit is contained in:
Cormac Shannon
2026-02-28 19:07:00 +00:00
parent 4b49907ce7
commit 27f16b126d
6 changed files with 281 additions and 6 deletions

View File

@@ -471,12 +471,14 @@ do print("testing flush")
assert(io.flush()) -- write to device
assert(f:close())
local f = io.output("/dev/full")
assert(f:write("abcd")) -- write to buffer
assert(not f:flush()) -- cannot write to device
assert(f:write("abcd")) -- write to buffer
assert(not io.flush()) -- cannot write to device
assert(f:close())
local ok, f = pcall(io.output, "/dev/full")
if ok then -- /dev/full exists (Linux); skip on macOS
assert(f:write("abcd")) -- write to buffer
assert(not f:flush()) -- cannot write to device
assert(f:write("abcd")) -- write to buffer
assert(not io.flush()) -- cannot write to device
assert(f:close())
end
end