From dc86e7658ab4608c334c4782b98909233ab393d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 15 Nov 2016 13:21:43 +0100 Subject: test/lua: make tests more robust, print Lua include paths --- lua/visrc.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lua/visrc.lua') diff --git a/lua/visrc.lua b/lua/visrc.lua index cdb8e1c..9210c26 100644 --- a/lua/visrc.lua +++ b/lua/visrc.lua @@ -3,9 +3,11 @@ dofile("utils.lua") vis.events = {} vis.events.win_open = function(win) -- test.in file passed to vis - in_file = win.file.name - -- use the corresponding test.lua file - lua_file = string.gsub(in_file, '%.in$', '.lua') - dofile(lua_file) + local in_file = win.file.name + if in_file then + -- use the corresponding test.lua file + lua_file = string.gsub(in_file, '%.in$', '.lua') + dofile(lua_file) + end vis:command('q!') end -- cgit v1.2.3