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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user