diff options
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 561 |
1 files changed, 107 insertions, 454 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 1d11a12af4..85895b2c36 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -50,10 +50,7 @@ describe('ui/ext_messages', function() feed(':call confirm("test")<cr>') screen:expect{grid=[[ line ^1 | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={ { content = {{"\ntest\n[O]k: ", 4}}, kind = 'confirm', @@ -62,10 +59,7 @@ describe('ui/ext_messages', function() feed('<cr>') screen:expect{grid=[[ line ^1 | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]} end) @@ -77,9 +71,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ line 1 | line ^2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], messages={ { content = {{"\ntest\n[O]k: ", 4}}, kind = 'confirm', @@ -88,9 +80,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ line 1 | line ^2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], messages={ { content = { { "\ntest\n[O]k: ", 4 } }, kind = "confirm" @@ -108,9 +98,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ l{7:i}ne 1 | l{8:i}ne ^2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], attr_ids={ [1] = {bold = true, foreground = Screen.colors.Blue1}, [2] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red}, @@ -133,9 +121,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ line 1 | {MATCH:.*}| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], attr_ids={ [1] = {bold = true, foreground = Screen.colors.Blue1}, [7] = {foreground = Screen.colors.Red}, @@ -150,9 +136,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ l^ine 1 | line 2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], attr_ids={ [1] = {bold = true, foreground = Screen.colors.Blue1}, [2] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red}, @@ -171,9 +155,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ l^ine 1 | line 2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], messages={ { content = { { "Error detected while processing :", 2 } }, kind = "emsg" @@ -193,9 +175,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ line 1 | ^line 2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], messages={ { content = { { "(2 of 2): line2" } }, kind = "quickfix" @@ -206,10 +186,7 @@ describe('ui/ext_messages', function() feed(':echoerr "raa"<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{"raa", 2}}, kind = "echoerr", @@ -219,10 +196,7 @@ describe('ui/ext_messages', function() feed(':') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], cmdline={{ firstc = ":", content = {{ "" }}, @@ -233,10 +207,7 @@ describe('ui/ext_messages', function() feed('echoerr "bork" | echoerr "fail"<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "bork", 2 }}, kind = "echoerr" @@ -251,10 +222,7 @@ describe('ui/ext_messages', function() feed(':echoerr "extrafail"<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = { { "bork", 2 } }, kind = "echoerr" @@ -272,20 +240,14 @@ describe('ui/ext_messages', function() feed('<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]} -- cmdline without interleaving wait/display keeps the error message feed(':echoerr "problem" | let x = input("foo> ")<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "problem", 2 }}, kind = "echoerr" @@ -298,20 +260,14 @@ describe('ui/ext_messages', function() feed('solution<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]} eq('solution', eval('x')) feed(":messages<cr>") screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], msg_history={ {kind="echoerr", content={{"raa", 2}}}, {kind="echoerr", content={{"bork", 2}}}, @@ -326,10 +282,7 @@ describe('ui/ext_messages', function() feed '<cr>' screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]} end) @@ -338,10 +291,7 @@ describe('ui/ext_messages', function() feed(':echoerr g:multi<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "bork\nfail", 2 }}, kind = "echoerr" @@ -350,10 +300,7 @@ describe('ui/ext_messages', function() feed(':messages<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "Press ENTER or type command to continue", 4 }}, kind = "return_prompt" @@ -371,9 +318,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ {7:^line} 1 | {7:line} 2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], messages={ {content = {{"/line W [1/2]"}}, kind = "search_count"} }} @@ -382,9 +327,7 @@ describe('ui/ext_messages', function() screen:expect{grid=[[ {7:line} 1 | {7:^line} 2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], messages={ {content = {{"/line [2/2]"}}, kind = "search_count"} }} @@ -394,10 +337,7 @@ describe('ui/ext_messages', function() feed(':hi ErrorMsg<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={ {content = {{"\nErrorMsg " }, {"xxx", 2}, {" "}, {"ctermfg=", 5 }, { "15 " }, { "ctermbg=", 5 }, { "1 " }, @@ -411,10 +351,7 @@ describe('ui/ext_messages', function() feed(':let x y<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={ {content = {{ "x #1" }}, kind = ""}, {content = {{ "y #2" }}, kind = ""}, @@ -427,10 +364,7 @@ describe('ui/ext_messages', function() feed('i') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={{"-- INSERT --", 3}}} feed('alphpabet<cr>alphanum<cr>') @@ -438,8 +372,7 @@ describe('ui/ext_messages', function() alphpabet | alphanum | ^ | - {1:~ }| - {1:~ }| + {1:~ }|*2 ]], showmode={ { "-- INSERT --", 3 } }} feed('<c-x>') @@ -447,8 +380,7 @@ describe('ui/ext_messages', function() alphpabet | alphanum | ^ | - {1:~ }| - {1:~ }| + {1:~ }|*2 ]], showmode={ { "-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)", 3 } }} feed('<c-p>') @@ -456,8 +388,7 @@ describe('ui/ext_messages', function() alphpabet | alphanum | alphanum^ | - {1:~ }| - {1:~ }| + {1:~ }|*2 ]], popupmenu={ anchor = { 1, 2, 0 }, items = { { "alphpabet", "", "", "" }, { "alphanum", "", "", "" } }, @@ -471,8 +402,7 @@ describe('ui/ext_messages', function() alphpabet | alphanum | alphanum^ | - {1:~ }| - {1:~ }| + {1:~ }|*2 ]], popupmenu={ anchor = { 1, 2, 0 }, items = { { "alphpabet", "", "", "" }, { "alphanum", "", "", "" } }, @@ -487,8 +417,7 @@ describe('ui/ext_messages', function() alphpabet | alphanum | alphpabet^ | - {1:~ }| - {1:~ }| + {1:~ }|*2 ]], popupmenu={ anchor = { 1, 2, 0 }, items = { { "alphpabet", "", "", "" }, { "alphanum", "", "", "" } }, @@ -503,8 +432,7 @@ describe('ui/ext_messages', function() alphpabet | alphanum | alphpabe^t | - {1:~ }| - {1:~ }| + {1:~ }|*2 ]], msg_history={{ content = {{ "stuff" }}, kind = "echomsg", @@ -518,37 +446,25 @@ describe('ui/ext_messages', function() feed('qq') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={ { "recording @q", 3 } }} feed('i') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={ { "-- INSERT --recording @q", 3 } }} feed('<esc>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={ { "recording @q", 3 } }} feed('q') screen:expect([[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]) end) @@ -558,37 +474,25 @@ describe('ui/ext_messages', function() -- also check mode to avoid immediate success screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={ { "recording @q", 3 } }, mode="normal"} feed('i') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={ { "recording @q", 3 } }, mode="insert"} feed('<esc>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={ { "recording @q", 3 } }, mode="normal"} feed('q') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], mode="normal"} end) @@ -596,66 +500,48 @@ describe('ui/ext_messages', function() command('set showcmd ruler') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], ruler={ { "0,0-1 All" } }} feed('i') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], showmode={ { "-- INSERT --", 3 } }, ruler={ { "0,1 All" } }} feed('abcde<cr>12345<esc>') screen:expect{grid=[[ abcde | 1234^5 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], ruler={ { "2,5 All" } }} feed('d') screen:expect{grid=[[ abcde | 1234^5 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], showcmd={ { "d" } }, ruler={ { "2,5 All" } }} feed('<esc>^') screen:expect{grid=[[ abcde | ^12345 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], ruler={ { "2,1 All" } }} feed('d') screen:expect{grid=[[ abcde | ^12345 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], showcmd={ { "d" } }, ruler={ { "2,1 All" } }} feed('i') screen:expect{grid=[[ abcde | ^12345 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], showcmd={ { "di" } }, ruler={ { "2,1 All" } }} feed('w') screen:expect{grid=[[ abcde | ^ | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 ]], ruler={ { "2,0-1 All" } }} -- when ruler is part of statusline it is not externalized. @@ -664,8 +550,7 @@ describe('ui/ext_messages', function() screen:expect([[ abcde | ^ | - {1:~ }| - {1:~ }| + {1:~ }|*2 {6:<o Name] [+] 2,0-1 All}| ]]) end) @@ -674,10 +559,7 @@ describe('ui/ext_messages', function() feed(':echomsg "howdy"<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "howdy" }}, kind = "echomsg"} }} @@ -687,10 +569,7 @@ describe('ui/ext_messages', function() feed('<c-c>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "Type :qa and press <Enter> to exit Nvim" }}, kind = ""} @@ -699,10 +578,7 @@ describe('ui/ext_messages', function() feed(':echoerr "bork"<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "bork", 2 }}, kind = "echoerr"} }} @@ -710,10 +586,7 @@ describe('ui/ext_messages', function() feed(':echo "xyz"<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "xyz" }}, kind = "echo"} }} @@ -721,10 +594,7 @@ describe('ui/ext_messages', function() feed(':call nosuchfunction()<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{ "E117: Unknown function: nosuchfunction", 2 }}, kind = "emsg"} @@ -733,10 +603,7 @@ describe('ui/ext_messages', function() feed(':messages<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], msg_history={ {kind="echomsg", content={{"howdy"}}}, {kind="", content={{"Type :qa and press <Enter> to exit Nvim"}}}, @@ -753,10 +620,7 @@ describe('ui/ext_messages', function() feed(':set cmdheight=1') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], cmdline={{ content = { { "set cmdheight=1" } }, firstc = ":", @@ -766,20 +630,14 @@ describe('ui/ext_messages', function() feed('<cr>') screen:expect([[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]) eq(0, eval('&cmdheight')) feed(':set cmdheight=0') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], cmdline={{ content = { { "set cmdheight=0" } }, firstc = ":", @@ -788,10 +646,7 @@ describe('ui/ext_messages', function() feed('<cr>') screen:expect([[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]) eq(0, eval('&cmdheight')) end) @@ -800,10 +655,7 @@ describe('ui/ext_messages', function() feed(':lua error("such\\nmultiline\\nerror")<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{[[E5108: Error executing lua [string ":lua"]:1: such multiline @@ -820,10 +672,7 @@ stack traceback: screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={{ content = {{"Error invoking 'test_method' on channel 1:\ncomplete\nerror\n\nmessage", 2}}, kind = "rpc_error" @@ -855,12 +704,7 @@ stack traceback: feed(':set wildm<tab>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*6 ]], messages={{ content = {{'wildmenu wildmode'}}, kind = '', @@ -879,9 +723,7 @@ stack traceback: feed('z=') screen:expect{grid=[[ {9:helllo} | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 {1:^~ }| ]], messages={ {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Hullo"\nType number and <Enter> or click with the mouse (q or empty cancels): ' } }, kind = ""} @@ -890,9 +732,7 @@ stack traceback: feed('1') screen:expect{grid=[[ {9:helllo} | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 {1:^~ }| ]], messages={ {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Hullo"\nType number and <Enter> or click with the mouse (q or empty cancels): ' } }, kind = ""}, @@ -902,10 +742,7 @@ stack traceback: feed('<cr>') screen:expect{grid=[[ ^Hello | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]} end) @@ -913,10 +750,7 @@ stack traceback: async_meths.echo({{'wow, ',"Search"}, {"such\n\nvery ", "ErrorMsg"}, {"color", "LineNr"}}, true, {}) screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={ { content = { { "wow, ", 7 }, { "such\n\nvery ", 2 }, { "color", 10 } }, kind = "echomsg" } }} @@ -924,10 +758,7 @@ stack traceback: feed ':ls<cr>' screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={ { content = { { '\n 1 %a "[No Name]" line 1' } }, kind = "" } }} @@ -935,10 +766,7 @@ stack traceback: feed ':messages<cr>' screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]], messages={ { content = { { "Press ENTER or type command to continue", 4 } }, kind = "return_prompt" } }, msg_history={ @@ -948,10 +776,7 @@ stack traceback: feed '<cr>' screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 ]]} end) @@ -1007,8 +832,7 @@ describe('ui/builtin messages', function() feed(':hi ErrorMsg<cr>') screen:expect([[ | - {1:~ }| - {1:~ }| + {1:~ }|*2 {3: }| :hi ErrorMsg | ErrorMsg {2:xxx} {5:ctermfg=}15 {5:ctermbg=}1 {5:guifg=}White {5:guibg=}Red | @@ -1092,31 +916,19 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed(':call T1()<CR>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 message T1 | ]]} feed(':call T2()<CR>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 message T2 | ]]} feed(':call T3()<CR>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 message T3 | ]]} end) @@ -1125,33 +937,21 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim command("set ruler laststatus=0") screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 0,0-1 All | ]]} command("hi MsgArea guibg=#333333") screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 {7: 0,0-1 All }| ]]} command("set rulerformat=%15(%c%V\\ %p%%%)") screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 {7: 0,0-1 100% }| ]]} end) @@ -1160,8 +960,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed(':echo "line 1\\r\\nline 2"<cr>') screen:expect{grid=[[ | - {1:~ }| - {1:~ }| + {1:~ }|*2 {3: }| line 1 | line 2 | @@ -1171,11 +970,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed('<cr>:echo "abc\\rz"<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 zbc | ]]} end) @@ -1245,8 +1040,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed(':set colorcolumn=5 | lua error("x\\n\\n\\nx")<cr>') screen:expect{grid=[[ {2:E5108: Error executing lua [string ":lua"]:1: x} | - | - | + |*2 {2:x} | {2:stack traceback:} | {2: [C]: in function 'error'} | @@ -1255,8 +1049,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed('<cr>') screen:expect{grid=[[ - | - | + |*2 {2:x} | {2:stack traceback:} | {2: [C]: in function 'error'} | @@ -1280,11 +1073,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed '<cr>' screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 | ]]} @@ -1319,8 +1108,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim {11: 2 }^bbb | {11: 3 }ccc | {11: 4 } | - {1:~ }| - {1:~ }| + {1:~ }|*2 | ]]) end) @@ -1341,9 +1129,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed(':call PrintAndWait()<CR>') screen:expect{grid=[[ | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 {3: }| aaa | bbb^ | @@ -1383,9 +1169,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim ]], false) screen:expect([[ | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 {3: }| | {4:Press ENTER or type command to continue}^ | @@ -1393,11 +1177,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim feed('<CR>') screen:expect([[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 | ]]) eq(1, meths.get_option_value('cmdheight', {})) @@ -1408,9 +1188,7 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim screen:try_resize(60, 5) screen:expect([[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]) eq({ mode = 'n', blocking = false }, meths.get_mode()) @@ -1451,10 +1229,7 @@ describe('ui/ext_messages', function() -- Note parts of it depends on version or is indeterministic. We ignore those parts. screen:expect([[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 {MATCH:.*}| {1:~ }| {1:~ }Nvim is open source and freely distributable{1: }| @@ -1467,50 +1242,20 @@ describe('ui/ext_messages', function() {1:~ }| {1:~{MATCH: +}}type :help news{5:<Enter>} to see changes in v{MATCH:%d+%.%d+}{1:{MATCH: +}}| {1:~ }| - {MATCH:.*}| - {MATCH:.*}| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {MATCH:.*}|*2 + {1:~ }|*5 ]]) feed("<c-l>") screen:expect([[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*23 ]]) feed(":intro<cr>") screen:expect{grid=[[ ^ | - | - | - | - | + |*4 {MATCH:.*}| | Nvim is open source and freely distributable | @@ -1523,13 +1268,8 @@ describe('ui/ext_messages', function() | {MATCH: +}type :help news{5:<Enter>} to see changes in v{MATCH:%d+%.%d+ +}| | - {MATCH:.*}| - {MATCH:.*}| - | - | - | - | - | + {MATCH:.*}|*2 + |*5 ]], messages={ {content = { { "Press ENTER or type command to continue", 4 } }, kind = "return_prompt" } }} @@ -1541,28 +1281,10 @@ describe('ui/ext_messages', function() feed(":set cmdheight<cr>") screen:expect({grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*10 ────────────────────────────────────────────────────────────────────────────────| | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*10 {7:[No Name] }| ]], messages={ {content = { { " cmdheight=0" } }, kind = "" } @@ -1572,28 +1294,10 @@ describe('ui/ext_messages', function() feed(":set laststatus<cr>") screen:expect({grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*11 ────────────────────────────────────────────────────────────────────────────────| | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*9 {7:[No Name] }| ]], messages={ {content = { { " laststatus=3" } }, kind = "" } @@ -1607,28 +1311,10 @@ describe('ui/ext_messages', function() feed(":set cmdheight<cr>") screen:expect({grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*10 ────────────────────────────────────────────────────────────────────────────────| | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*10 {7:[No Name] }| ]], messages={ {content = { { " cmdheight=0" } }, kind = "" } @@ -1726,9 +1412,7 @@ aliquip ex ea commodo consequat.]]) feed('q') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]} end) @@ -1748,9 +1432,7 @@ aliquip ex ea commodo consequat.]]) feed('q') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]} feed(':mess<cr>') @@ -2064,10 +1746,7 @@ aliquip ex ea commodo consequat.]]) feed(':!sleep 1<cr>') screen:expect{grid=[[ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 {12: }| :!sleep 1 | | @@ -2080,8 +1759,7 @@ aliquip ex ea commodo consequat.]]) -- before the "press ENTER" prompt though screen:expect{grid=[[ | - {1:~ }| - {1:~ }| + {1:~ }|*2 {12: }| :!sleep 1 | | @@ -2092,9 +1770,7 @@ aliquip ex ea commodo consequat.]]) feed('<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]} end) @@ -2134,9 +1810,7 @@ aliquip ex ea commodo consequat.]]) {2:mpore} | {2:incididunt ut labore et dolore}| {2:a aliqua.} | - | - | - | + |*3 {4:-- More --}^ | ]]} @@ -2177,16 +1851,7 @@ aliquip ex ea commodo consequat.]]) feed('q') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*10 | ]]} end) @@ -2208,13 +1873,7 @@ aliquip ex ea commodo consequat.]]) feed('<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*7 ]]} feed('g<lt>') @@ -2232,13 +1891,7 @@ aliquip ex ea commodo consequat.]]) feed('<cr>') screen:expect{grid=[[ ^ | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*7 ]]} end) end) |