From e6d0dea42b28a4814546bcf699ce277c365ebfc1 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Tue, 27 Nov 2018 16:29:43 +0100 Subject: 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+. --- test/functional/eval/function_spec.lua | 1 + test/functional/eval/server_spec.lua | 1 + 2 files changed, 2 insertions(+) (limited to 'test/functional/eval') diff --git a/test/functional/eval/function_spec.lua b/test/functional/eval/function_spec.lua index 776e760aaf..1a86576fde 100644 --- a/test/functional/eval/function_spec.lua +++ b/test/functional/eval/function_spec.lua @@ -1,4 +1,5 @@ local helpers = require('test.functional.helpers')(after_each) +local unpack = table.unpack or unpack -- luacheck: ignore local clear = helpers.clear local eq = helpers.eq diff --git a/test/functional/eval/server_spec.lua b/test/functional/eval/server_spec.lua index 563e619b39..8a0831bba1 100644 --- a/test/functional/eval/server_spec.lua +++ b/test/functional/eval/server_spec.lua @@ -6,6 +6,7 @@ local iswin = helpers.iswin local ok = helpers.ok local matches = helpers.matches local expect_err = helpers.expect_err +local unpack = table.unpack or unpack -- luacheck: ignore local function clear_serverlist() for _, server in pairs(funcs.serverlist()) do -- cgit