diff options
Diffstat (limited to 'test/functional/core/startup_spec.lua')
-rw-r--r-- | test/functional/core/startup_spec.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 2e6649d16a..adf29cbe7c 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -33,6 +33,8 @@ local tbl_map = vim.tbl_map local tbl_filter = vim.tbl_filter local endswith = vim.endswith +local testlog = 'Xtest-startupspec-log' + describe('startup', function() it('--clean', function() clear() @@ -121,6 +123,10 @@ end) describe('startup', function() before_each(clear) + after_each(function() + os.remove(testlog) + end) + describe('-l Lua', function() local function assert_l_out(expected, nvim_args, lua_args, script, input) local args = { nvim_prog } @@ -371,6 +377,7 @@ describe('startup', function() end) it('output to pipe: has("ttyin")==1 has("ttyout")==0', function() + clear({ env = { NVIM_LOG_FILE = testlog } }) if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -398,9 +405,13 @@ describe('startup', function() read_file('Xtest_startup_ttyout') ) end) + if is_os('win') then + assert_log('stream write failed. RPC canceled; closing channel', testlog) + end end) it('input from pipe: has("ttyin")==0 has("ttyout")==1', function() + clear({ env = { NVIM_LOG_FILE = testlog } }) if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -429,9 +440,13 @@ describe('startup', function() read_file('Xtest_startup_ttyout') ) end) + if is_os('win') then + assert_log('stream write failed. RPC canceled; closing channel', testlog) + end end) it('input from pipe (implicit) #7679', function() + clear({ env = { NVIM_LOG_FILE = testlog } }) local screen = Screen.new(25, 4) screen:attach() screen._default_attr_ids = nil @@ -457,6 +472,9 @@ describe('startup', function() 0 1 | | ]]) + if not is_os('win') then + assert_log('Failed to get flags on descriptor 3: Bad file descriptor', testlog) + end end) it('input from pipe + file args #7679', function() |