diff options
author | ZyX <kp-pav@yandex.ru> | 2015-08-08 14:54:47 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-08 22:00:34 +0300 |
commit | 17b5d27d85e772907fe3ca48fd8f58117564c72c (patch) | |
tree | 71d08d2509f2846db85fbfac75133f783094db26 /test/functional/shada/errors_spec.lua | |
parent | 42fbfd3aee79961ba68d4f45af5e1926d7aa97a0 (diff) | |
download | rneovim-17b5d27d85e772907fe3ca48fd8f58117564c72c.tar.gz rneovim-17b5d27d85e772907fe3ca48fd8f58117564c72c.tar.bz2 rneovim-17b5d27d85e772907fe3ca48fd8f58117564c72c.zip |
functests: Move wshada and sdrcmd commands to helpers
Diffstat (limited to 'test/functional/shada/errors_spec.lua')
-rw-r--r-- | test/functional/shada/errors_spec.lua | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/test/functional/shada/errors_spec.lua b/test/functional/shada/errors_spec.lua index 0dfb204b35..a53b5cee2b 100644 --- a/test/functional/shada/errors_spec.lua +++ b/test/functional/shada/errors_spec.lua @@ -3,20 +3,14 @@ local helpers = require('test.functional.helpers') local nvim, nvim_window, nvim_curwin, nvim_command, nvim_feed, nvim_eval, eq = helpers.nvim, helpers.window, helpers.curwin, helpers.command, helpers.feed, helpers.eval, helpers.eq -local write_file = helpers.write_file local shada_helpers = require('test.functional.shada.helpers') -local reset, set_additional_cmd, clear, exc_exec = +local reset, set_additional_cmd, clear, exc_exec, get_shada_rw = shada_helpers.reset, shada_helpers.set_additional_cmd, - shada_helpers.clear, shada_helpers.exc_exec - -local shada_fname = 'Xtest-functional-shada-errors.shada' -local wshada = function(text) - write_file(shada_fname, text, true) -end -local sdrcmd = function(bang) - return 'rshada' .. (bang and '!' or '') .. ' ' .. shada_fname -end + shada_helpers.clear, shada_helpers.exc_exec, + shada_helpers.get_shada_rw + +local wshada, sdrcmd, shada_fname = get_shada_rw('Xtest-functional-shada-errors.shada') describe('ShaDa error handling', function() before_each(reset) |