aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/startup_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:15:05 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:27:38 +0000
commitc5d770d311841ea5230426cc4c868e8db27300a8 (patch)
treedd21f70127b4b8b5f109baefc8ecc5016f507c91 /test/functional/core/startup_spec.lua
parent9be89f131f87608f224f0ee06d199fcd09d32176 (diff)
parent081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff)
downloadrneovim-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/startup_spec.lua')
-rw-r--r--test/functional/core/startup_spec.lua35
1 files changed, 20 insertions, 15 deletions
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',