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/helpers.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index a94e977cd0..7921cc05bf 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -2,6 +2,7 @@ require('coxpcall') local luv = require('luv') local lfs = require('lfs') local global_helpers = require('test.helpers') +local unpack = table.unpack or unpack -- luacheck: ignore -- nvim client: Found in .deps/usr/share/lua//nvim/ if "bundled". local Session = require('nvim.session') -- cgit From 221f6fffad12beaa928ccedae336d64b7b1c1208 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 29 Nov 2018 22:51:20 +0100 Subject: runtime/lua/vim/compat.lua ref #9280 Introduce the `vim.compat` module, to help environments with system Lua 5.2+ run the build/tests. Include the module implicitly in all tests. ref #8677 legacy `vim` module: beep buffer command dict eval firstline lastline line list open type window --- test/functional/helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 7921cc05bf..272b80466c 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -1,8 +1,8 @@ +require('vim.compat') require('coxpcall') local luv = require('luv') local lfs = require('lfs') local global_helpers = require('test.helpers') -local unpack = table.unpack or unpack -- luacheck: ignore -- nvim client: Found in .deps/usr/share/lua//nvim/ if "bundled". local Session = require('nvim.session') -- cgit