aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2023-12-07 13:02:02 -0800
committerGitHub <noreply@github.com>2023-12-07 13:02:02 -0800
commit75aaec1b60e81742c01156e6884e6df977a1803e (patch)
tree0c277084471e60006799bec4053e66789b636e02 /test/helpers.lua
parent9ae7d36ff5ebaf75597b442e10890bd77df01fbe (diff)
parent8957df4f22af508fa44b9f8ada7ee4636d972bd3 (diff)
downloadrneovim-75aaec1b60e81742c01156e6884e6df977a1803e.tar.gz
rneovim-75aaec1b60e81742c01156e6884e6df977a1803e.tar.bz2
rneovim-75aaec1b60e81742c01156e6884e6df977a1803e.zip
Merge pull request #26456 from gpanders/ignore-vim-runtime
fix(terminal): ignore $VIM and $VIMRUNTIME in pty jobs
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