diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-12-13 14:22:59 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-12-16 16:05:08 +0000 |
commit | 47f2769b462eb6bd1c10efec3c32ed55134ce628 (patch) | |
tree | 67194cdaa67e06e1f52288dc5abbd724db8f0286 /test/testutil.lua | |
parent | b5c0290803508c0dc996a9bed70f5fa9ceb93c44 (diff) | |
download | rneovim-47f2769b462eb6bd1c10efec3c32ed55134ce628.tar.gz rneovim-47f2769b462eb6bd1c10efec3c32ed55134ce628.tar.bz2 rneovim-47f2769b462eb6bd1c10efec3c32ed55134ce628.zip |
fix(Man): completion on Mac
Problem:
`man -w` does not work on recent versions of MacOs.
Solution:
Make it so an empty result is interpreted as an error unless silent=true
Diffstat (limited to 'test/testutil.lua')
-rw-r--r-- | test/testutil.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/testutil.lua b/test/testutil.lua index 00b30d74d5..007e017ac6 100644 --- a/test/testutil.lua +++ b/test/testutil.lua @@ -409,6 +409,17 @@ function M.is_os(s) ) end +local architecture = uv.os_uname().machine + +--- @param s 'x86_64'|'arm64' +--- @return boolean +function M.is_arch(s) + if not (s == 'x86_64' or s == 'arm64') then + error('unknown architecture: ' .. tostring(s)) + end + return s == architecture +end + local tmpname_id = 0 local tmpdir = os.getenv('TMPDIR') or os.getenv('TEMP') local tmpdir_is_local = not not (tmpdir and tmpdir:find('Xtest')) |