diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:15:05 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:27:38 +0000 |
commit | c5d770d311841ea5230426cc4c868e8db27300a8 (patch) | |
tree | dd21f70127b4b8b5f109baefc8ecc5016f507c91 /test/functional/core | |
parent | 9be89f131f87608f224f0ee06d199fcd09d32176 (diff) | |
parent | 081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff) | |
download | rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2 rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/core')
-rw-r--r-- | test/functional/core/fileio_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/core/job_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/core/log_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/core/main_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/core/startup_spec.lua | 35 |
5 files changed, 21 insertions, 22 deletions
diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua index d33710a63d..cf9715f848 100644 --- a/test/functional/core/fileio_spec.lua +++ b/test/functional/core/fileio_spec.lua @@ -59,7 +59,6 @@ describe('fileio', function() local screen_nvim = spawn(argv) set_session(screen_nvim) local screen = Screen.new(70, 10) - screen:attach() screen:set_default_attr_ids({ [1] = { foreground = Screen.colors.NvimDarkGrey4 }, [2] = { background = Screen.colors.NvimDarkGrey1, foreground = Screen.colors.NvimLightGrey3 }, @@ -276,7 +275,6 @@ describe('fileio', function() write_file('Xtest-overwrite-forced', 'foobar') command('set nofixendofline') local screen = Screen.new(40, 4) - screen:attach() command('set shortmess-=F') command('e Xtest-overwrite-forced') diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 68ac0a50f6..618c294566 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -498,7 +498,6 @@ describe('jobs', function() it('can redefine callbacks being used by a job', function() local screen = Screen.new() - screen:attach() screen:set_default_attr_ids({ [1] = { bold = true, foreground = Screen.colors.Blue }, }) @@ -524,7 +523,6 @@ describe('jobs', function() it('requires funcrefs for script-local (s:) functions', function() local screen = Screen.new(60, 5) - screen:attach() screen:set_default_attr_ids({ [1] = { bold = true, foreground = Screen.colors.Blue1 }, [2] = { foreground = Screen.colors.Grey100, background = Screen.colors.Red }, @@ -910,7 +908,6 @@ describe('jobs', function() it('hides cursor and flushes messages before blocking', function() local screen = Screen.new(50, 6) - screen:attach() command([[let g:id = jobstart([v:progpath, '--clean', '--headless'])]]) source([[ func PrintAndWait() @@ -1223,7 +1220,6 @@ describe('pty process teardown', function() before_each(function() clear() screen = Screen.new(30, 6) - screen:attach() screen:expect([[ ^ | {1:~ }|*4 diff --git a/test/functional/core/log_spec.lua b/test/functional/core/log_spec.lua index a952730779..57dfd6364c 100644 --- a/test/functional/core/log_spec.lua +++ b/test/functional/core/log_spec.lua @@ -15,6 +15,7 @@ describe('log', function() after_each(function() expect_exit(command, 'qa!') + vim.uv.sleep(10) -- Wait for Nvim to fully exit os.remove(testlog) end) diff --git a/test/functional/core/main_spec.lua b/test/functional/core/main_spec.lua index a6e917b4b2..a445423efc 100644 --- a/test/functional/core/main_spec.lua +++ b/test/functional/core/main_spec.lua @@ -89,7 +89,6 @@ describe('command-line option', function() it('does not crash after reading from stdin in non-headless mode', function() skip(is_os('win')) local screen = Screen.new(40, 8) - screen:attach() local args = { nvim_prog_abs(), '-u', diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index f48bcb9360..7062211187 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -55,7 +55,6 @@ describe('startup', function() clear() local screen screen = Screen.new(84, 3) - screen:attach() fn.termopen({ nvim_prog, '-u', 'NONE', '--server', eval('v:servername'), '--remote-ui' }) screen:expect([[ ^Cannot attach UI of :terminal child to its parent. (Unset $NVIM to skip this check) | @@ -74,11 +73,29 @@ describe('startup', function() assert_log("require%('vim%._editor'%)", testfile, 100) end) + it('--startuptime does not crash on error #31125', function() + eq( + "E484: Can't open file .", + fn.system({ + nvim_prog, + '-u', + 'NONE', + '-i', + 'NONE', + '--headless', + '--startuptime', + '.', + '-c', + '42cquit', + }) + ) + eq(42, api.nvim_get_vvar('shell_error')) + end) + it('-D does not hang #12647', function() clear() local screen screen = Screen.new(60, 7) - screen:attach() -- not the same colors on windows for some reason screen._default_attr_ids = nil local id = fn.termopen({ @@ -260,10 +277,8 @@ describe('startup', function() -- nvim <vim args> -l foo.lua <vim args> assert_l_out( - -- luacheck: ignore 611 (Line contains only whitespaces) [[ wrap - bufs: nvim args: 7 lua args: { "-c", "set wrap?", @@ -327,7 +342,6 @@ describe('startup', function() it('with --embed: has("ttyin")==0 has("ttyout")==0', function() local screen = Screen.new(25, 3) -- Remote UI connected by --embed. - screen:attach() -- TODO: a lot of tests in this file already use the new default color scheme. -- once we do the batch update of tests to use it, remove this workarond screen._default_attr_ids = nil @@ -341,7 +355,6 @@ describe('startup', function() it('in a TTY: has("ttyin")==1 has("ttyout")==1', function() local screen = Screen.new(25, 4) - screen:attach() screen._default_attr_ids = nil if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) @@ -436,7 +449,6 @@ describe('startup', function() 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 if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) @@ -601,7 +613,6 @@ describe('startup', function() it('ENTER dismisses early message #7967', function() local screen screen = Screen.new(60, 6) - screen:attach() screen._default_attr_ids = nil local id = fn.termopen({ nvim_prog, @@ -699,7 +710,6 @@ describe('startup', function() it('-e/-E interactive #7679', function() clear('-e') local screen = Screen.new(25, 3) - screen:attach() feed("put ='from -e'<CR>") screen:expect([[ :put ='from -e' | @@ -709,7 +719,6 @@ describe('startup', function() clear('-E') screen = Screen.new(25, 3) - screen:attach() feed("put ='from -E'<CR>") screen:expect([[ :put ='from -E' | @@ -719,9 +728,8 @@ describe('startup', function() end) it('-e sets ex mode', function() - local screen = Screen.new(25, 3) clear('-e') - screen:attach() + local screen = Screen.new(25, 3) -- Verify we set the proper mode both before and after :vi. feed('put =mode(1)<CR>vi<CR>:put =mode(1)<CR>') screen:expect([[ @@ -773,7 +781,6 @@ describe('startup', function() it("sets 'shortmess' when loading other tabs", function() clear({ args = { '-p', 'a', 'b', 'c' } }) local screen = Screen.new(25, 4) - screen:attach() screen:expect({ grid = [[ {1: a }{2: b c }{3: }{2:X}| @@ -1136,7 +1143,6 @@ describe('user config init', function() eq('---', eval('g:exrc_file')) local screen = Screen.new(50, 8) - screen:attach() screen._default_attr_ids = nil fn.termopen({ nvim_prog }, { env = { @@ -1412,7 +1418,6 @@ describe('inccommand on ex mode', function() clear() local screen screen = Screen.new(60, 10) - screen:attach() local id = fn.termopen({ nvim_prog, '-u', |