aboutsummaryrefslogtreecommitdiff
path: root/test/testutil.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/testutil.lua')
-rw-r--r--test/testutil.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testutil.lua b/test/testutil.lua
index 3226bfeb1e..e69dcae120 100644
--- a/test/testutil.lua
+++ b/test/testutil.lua
@@ -388,15 +388,18 @@ end
local sysname = uv.os_uname().sysname:lower()
---- @param s 'win'|'mac'|'freebsd'|'openbsd'|'bsd'
+--- @param s 'win'|'mac'|'linux'|'freebsd'|'openbsd'|'bsd'
--- @return boolean
function M.is_os(s)
- if not (s == 'win' or s == 'mac' or s == 'freebsd' or s == 'openbsd' or s == 'bsd') then
+ if
+ not (s == 'win' or s == 'mac' or s == 'linux' or s == 'freebsd' or s == 'openbsd' or s == 'bsd')
+ then
error('unknown platform: ' .. tostring(s))
end
return not not (
(s == 'win' and (sysname:find('windows') or sysname:find('mingw')))
or (s == 'mac' and sysname == 'darwin')
+ or (s == 'linux' and sysname == 'linux')
or (s == 'freebsd' and sysname == 'freebsd')
or (s == 'openbsd' and sysname == 'openbsd')
or (s == 'bsd' and sysname:find('bsd'))