aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2023-12-07 09:28:46 -0800
committerGregory Anders <greg@gpanders.com>2023-12-07 11:54:22 -0800
commit8957df4f22af508fa44b9f8ada7ee4636d972bd3 (patch)
treeb8255d4ae4c6043cc17a3382de9e066b316cda32 /test/helpers.lua
parent5e78fd7784509dbbe146748e9264e5129cf68ab8 (diff)
downloadrneovim-8957df4f22af508fa44b9f8ada7ee4636d972bd3.tar.gz
rneovim-8957df4f22af508fa44b9f8ada7ee4636d972bd3.tar.bz2
rneovim-8957df4f22af508fa44b9f8ada7ee4636d972bd3.zip
test: forward $VIMRUNTIME in child nvim instances
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index 4db2175a63..0ced3ec163 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -376,6 +376,19 @@ function module.is_os(s)
)
end
+function module.is_arch(s)
+ local machine = luv.os_uname().machine
+ if s == 'arm64' or s == 'aarch64' then
+ return machine == 'arm64' or machine == 'aarch64'
+ end
+
+ if s == 'x86' or s == 'x86_64' or s == 'amd64' then
+ return machine == 'x86_64'
+ end
+
+ return machine == s
+end
+
local function tmpdir_get()
return os.getenv('TMPDIR') and os.getenv('TMPDIR') or os.getenv('TEMP')
end