From 1162962d8beaab6be78a32954600205686f5d09b Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 27 Sep 2015 02:49:48 +0300 Subject: functests: Refactor tests: - Remove unused variables. - Do not use helpers.nvim_feed in most cases. - Do not use helpers.nvim and helpers.nvim_eval at all. - Add helpers.funcs and helpers.\*meths special tables. Indexing such table creates functions which call helpers.call or helpers.nvim (and similar) with first argument equal to table index. --- test/functional/shada/helpers.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/functional/shada/helpers.lua') diff --git a/test/functional/shada/helpers.lua b/test/functional/shada/helpers.lua index 3af92112cb..c2ff4cadd1 100644 --- a/test/functional/shada/helpers.lua +++ b/test/functional/shada/helpers.lua @@ -1,7 +1,6 @@ local helpers = require('test.functional.helpers') -local spawn, set_session, nvim, nvim_prog, nvim_command, nvim_eval = - helpers.spawn, helpers.set_session, helpers.nvim, helpers.nvim_prog, - helpers.command, helpers.eval +local spawn, set_session, meths, nvim_prog = + helpers.spawn, helpers.set_session, helpers.meths, helpers.nvim_prog local write_file, merge_args = helpers.write_file, helpers.merge_args local msgpack = require('MessagePack') @@ -30,7 +29,7 @@ local reset = function() end session = spawn(nvim_argv()) set_session(session) - nvim('set_var', 'tmpname', tmpname) + meths.set_var('tmpname', tmpname) end local set_additional_cmd = function(s) -- cgit