diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-09-22 10:20:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-22 10:20:23 +0200 |
commit | c236e80cf3dfae6df5c43ecfb19c7629c9884f7b (patch) | |
tree | 426eb0f7525621d9760bb2cbf394d5c42b691775 /test/functional/shada | |
parent | 7f990741f7018b5e52833f2da6913b97c6d2d5ee (diff) | |
parent | 4da5cb38d396d76d8072815d150725f7c9a85078 (diff) | |
download | rneovim-c236e80cf3dfae6df5c43ecfb19c7629c9884f7b.tar.gz rneovim-c236e80cf3dfae6df5c43ecfb19c7629c9884f7b.tar.bz2 rneovim-c236e80cf3dfae6df5c43ecfb19c7629c9884f7b.zip |
Merge pull request #9024 from bfredl/embed_ui2
always wait for UI with --embed, unless --headless is supplied
Diffstat (limited to 'test/functional/shada')
-rw-r--r-- | test/functional/shada/helpers.lua | 5 | ||||
-rw-r--r-- | test/functional/shada/marks_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/shada/shada_spec.lua | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/test/functional/shada/helpers.lua b/test/functional/shada/helpers.lua index 1312d762d8..d5e061bb50 100644 --- a/test/functional/shada/helpers.lua +++ b/test/functional/shada/helpers.lua @@ -9,9 +9,12 @@ local tmpname = helpers.tmpname() local append_argv = nil local function nvim_argv(shada_file, embed) + if embed == nil then + embed = true + end local argv = {nvim_prog, '-u', 'NONE', '-i', shada_file or tmpname, '-N', '--cmd', 'set shortmess+=I background=light noswapfile', - embed or '--embed'} + '--headless', embed and '--embed' or nil} if helpers.prepend_argv or append_argv then return merge_args(helpers.prepend_argv, argv, append_argv) else diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua index 4cceae1aa3..c2f6351e00 100644 --- a/test/functional/shada/marks_spec.lua +++ b/test/functional/shada/marks_spec.lua @@ -224,7 +224,7 @@ describe('ShaDa support code', function() it('does not create incorrect file for non-existent buffers when writing from -c', function() add_argv('--cmd', 'silent edit ' .. non_existent_testfilename, '-c', 'qall') - local argv = nvim_argv(nil, '--headless') + local argv = nvim_argv(nil, false) -- no --embed eq('', funcs.system(argv)) eq(0, exc_exec('rshada')) end) @@ -233,7 +233,7 @@ describe('ShaDa support code', function() function() add_argv('-c', 'silent edit ' .. non_existent_testfilename, '-c', 'autocmd VimEnter * qall') - local argv = nvim_argv(nil, '--headless') + local argv = nvim_argv(nil, false) -- no --embed eq('', funcs.system(argv)) eq(0, exc_exec('rshada')) end) diff --git a/test/functional/shada/shada_spec.lua b/test/functional/shada/shada_spec.lua index 720855860a..5f7daf73e5 100644 --- a/test/functional/shada/shada_spec.lua +++ b/test/functional/shada/shada_spec.lua @@ -137,7 +137,7 @@ describe('ShaDa support code', function() it('does not write NONE file', function() local session = spawn({nvim_prog, '-u', 'NONE', '-i', 'NONE', '--embed', - '--cmd', 'qall'}, true) + '--headless', '--cmd', 'qall'}, true) session:close() eq(nil, lfs.attributes('NONE')) eq(nil, lfs.attributes('NONE.tmp.a')) @@ -145,8 +145,8 @@ describe('ShaDa support code', function() it('does not read NONE file', function() write_file('NONE', '\005\001\015\131\161na\162rX\194\162rc\145\196\001-') - local session = spawn({nvim_prog, '-u', 'NONE', '-i', 'NONE', '--embed'}, - true) + local session = spawn({nvim_prog, '-u', 'NONE', '-i', 'NONE', '--embed', + '--headless'}, true) set_session(session) eq('', funcs.getreg('a')) session:close() |