aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2018-11-27 16:29:43 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-12-20 11:57:30 +0100
commite6d0dea42b28a4814546bcf699ce277c365ebfc1 (patch)
treea5dd79853c12837dfc35d001939f9ef947a6b75b /test/functional/api
parentccb005b9e0d509bbe595515e7e17b0e9713a2c19 (diff)
downloadrneovim-e6d0dea42b28a4814546bcf699ce277c365ebfc1.tar.gz
rneovim-e6d0dea42b28a4814546bcf699ce277c365ebfc1.tar.bz2
rneovim-e6d0dea42b28a4814546bcf699ce277c365ebfc1.zip
test: Lua 5.2/5.3 compat #9280
Make the code run both on Lua 5.1 (which is the default for Neovim, and is what LuaJIT provides) and Lua 5.2+.
Diffstat (limited to 'test/functional/api')
-rw-r--r--test/functional/api/server_requests_spec.lua1
-rw-r--r--test/functional/api/tabpage_spec.lua1
-rw-r--r--test/functional/api/window_spec.lua1
3 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua
index 4d25ba0819..8de71a56e9 100644
--- a/test/functional/api/server_requests_spec.lua
+++ b/test/functional/api/server_requests_spec.lua
@@ -2,6 +2,7 @@
-- `rpcrequest` calls we need the client event loop to be running.
local helpers = require('test.functional.helpers')(after_each)
local Paths = require('test.config.paths')
+local unpack = table.unpack or unpack -- luacheck: ignore
local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval
local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop
diff --git a/test/functional/api/tabpage_spec.lua b/test/functional/api/tabpage_spec.lua
index c49091db02..584bca7111 100644
--- a/test/functional/api/tabpage_spec.lua
+++ b/test/functional/api/tabpage_spec.lua
@@ -8,6 +8,7 @@ local request = helpers.request
local NIL = helpers.NIL
local meth_pcall = helpers.meth_pcall
local command = helpers.command
+local unpack = table.unpack or unpack -- luacheck: ignore
describe('api/tabpage', function()
before_each(clear)
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index 4496e1f644..273991951c 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -12,6 +12,7 @@ local meth_pcall = helpers.meth_pcall
local meths = helpers.meths
local command = helpers.command
local expect_err = helpers.expect_err
+local unpack = table.unpack or unpack -- luacheck: ignore
-- check if str is visible at the beginning of some line
local function is_visible(str)