diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:31 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:31 +0000 |
commit | 9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch) | |
tree | 607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /test/compat.lua | |
parent | 9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff) | |
parent | 3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff) | |
download | rneovim-usermarks.tar.gz rneovim-usermarks.tar.bz2 rneovim-usermarks.zip |
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'test/compat.lua')
-rw-r--r-- | test/compat.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/compat.lua b/test/compat.lua new file mode 100644 index 0000000000..2c9786d491 --- /dev/null +++ b/test/compat.lua @@ -0,0 +1,12 @@ +-- Lua 5.1 forward-compatibility layer. +-- For background see https://github.com/neovim/neovim/pull/9280 +-- +-- Reference the lua-compat-5.2 project for hints: +-- https://github.com/keplerproject/lua-compat-5.2/blob/c164c8f339b95451b572d6b4b4d11e944dc7169d/compat52/mstrict.lua +-- https://github.com/keplerproject/lua-compat-5.2/blob/c164c8f339b95451b572d6b4b4d11e944dc7169d/tests/test.lua + +local lua_version = _VERSION:sub(-3) + +if lua_version >= '5.2' then + unpack = table.unpack -- luacheck: ignore 121 143 +end |