lua_lib_in_c_playground/test_uname.lua

28 lines
489 B
Lua
Raw Permalink Normal View History

---@module 'uname'
local uname
uname = require'uname'
print(uname)
for k, v in pairs(uname) do
print(k, v)
end
print("numid", uname.numid(1))
do
local result, ret = xpcall(uname.numid, debug.traceback, "a", "b")
if not result then
io.stderr:write("error" .. ret .. "\n")
else
print("result: " .. ret)
end
end
print(type(uname.uname()))
print("uname")
for k, v in pairs(uname.uname()) do
print(k, v)
end
print("OS is " .. uname.uname().sysname)