From 8957df4f22af508fa44b9f8ada7ee4636d972bd3 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Thu, 7 Dec 2023 09:28:46 -0800 Subject: test: forward $VIMRUNTIME in child nvim instances --- test/helpers.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/helpers.lua') 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 -- cgit