diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-11-15 13:21:43 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-11-15 13:21:43 +0100 |
| commit | dc86e7658ab4608c334c4782b98909233ab393d0 (patch) | |
| tree | 69e50ecd2d33ce5dd39b4193b7affd39bf950f43 /lua/visrc.lua | |
| parent | 9e6b3f2e30a1ff46ec6bd05383668fe0ea20ed0b (diff) | |
| download | vis-dc86e7658ab4608c334c4782b98909233ab393d0.tar.gz vis-dc86e7658ab4608c334c4782b98909233ab393d0.tar.xz | |
test/lua: make tests more robust, print Lua include paths
Diffstat (limited to 'lua/visrc.lua')
| -rw-r--r-- | lua/visrc.lua | 10 |
1 files changed, 6 insertions, 4 deletions
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 |
