test: avoid repeated screen lines in expected states

This is the command invoked repeatedly to make the changes:

    :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
This commit is contained in:
zeertzjq
2023-12-09 20:42:00 +08:00
parent 5e43630a26
commit 1037ce2e46
127 changed files with 3495 additions and 15660 deletions

View File

@ -170,10 +170,7 @@ describe('api/buf', function()
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
www |
xxx |
@ -186,10 +183,7 @@ describe('api/buf', function()
meths.buf_set_lines(buf, 0, 2, true, {"aaabbb"})
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
www |
xxx |
@ -203,10 +197,7 @@ describe('api/buf', function()
meths.buf_set_lines(buf, 3, 4, true, {"wwweeee"})
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
wwweeee |
xxx |
@ -220,10 +211,7 @@ describe('api/buf', function()
meths.buf_set_lines(buf, 3, 3, true, {"mmm"})
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
wwweeee |
xxx |
@ -236,10 +224,7 @@ describe('api/buf', function()
meths.win_set_cursor(0, {7, 0})
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
wwweeee |
xxx |
@ -252,10 +237,7 @@ describe('api/buf', function()
meths.buf_set_lines(buf, 4, 4, true, {"mmmeeeee"})
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
mmmeeeee |
wwweeee |
@ -275,10 +257,7 @@ describe('api/buf', function()
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:[No Name] }|
www |
xxx |
@ -291,10 +270,7 @@ describe('api/buf', function()
meths.buf_set_lines(buf, 0, 2, true, {"aaabbb"})
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:[No Name] }|
www |
xxx |
@ -308,10 +284,7 @@ describe('api/buf', function()
meths.buf_set_lines(buf, 3, 4, true, {"wwweeee"})
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:[No Name] }|
wwweeee |
xxx |
@ -325,10 +298,7 @@ describe('api/buf', function()
meths.buf_set_lines(buf, 3, 3, true, {"mmm"})
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:[No Name] }|
mmm |
wwweeee |
@ -1690,10 +1660,7 @@ describe('api/buf', function()
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
www |
xxx |
@ -1706,10 +1673,7 @@ describe('api/buf', function()
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:[No Name] }|
www |
xxx |
@ -1729,10 +1693,7 @@ describe('api/buf', function()
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:[No Name] }|
www |
xxx |
@ -1745,10 +1706,7 @@ describe('api/buf', function()
meths.buf_set_text(buf, 0,3, 1,0, {"X"})
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:[No Name] }|
www |
xxx |

View File

@ -435,14 +435,7 @@ describe('API/extmarks', function()
-- This shouldn't seg fault
screen:expect([[
12345^ 1 |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*8
|
]])
end)
@ -495,14 +488,7 @@ describe('API/extmarks', function()
insert('abc')
screen:expect([[
ab^c12345 |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*8
|
]])
local rv = get_extmark_by_id(ns, marks[1])
@ -1635,11 +1621,8 @@ describe('API/extmarks', function()
command('d2')
screen:expect([[
S2^aaa bbb ccc |
aaa bbb ccc |
aaa bbb ccc |
aaa bbb ccc |
|
|
aaa bbb ccc |*3
|*2
]])
-- mark is restored with undo_restore == true
command('silent undo')
@ -1647,8 +1630,7 @@ describe('API/extmarks', function()
S1 ^aaa bbb ccc |
S1S2aaa bbb ccc |
S2 aaa bbb ccc |
aaa bbb ccc |
aaa bbb ccc |
aaa bbb ccc |*2
|
]])
-- mark is deleted with undo_restore == false
@ -1923,12 +1905,9 @@ describe('API/win_extmark', function()
screen:expect({
grid = [[
## grid 1
[4:--------------------]|
[4:--------------------]|
[4:--------------------]|
[4:--------------------]|*3
[No Name] [+] |
[2:--------------------]|
[2:--------------------]|
[2:--------------------]|*2
[No Name] [+] |
[3:--------------------]|
## grid 2
@ -1959,12 +1938,9 @@ describe('API/win_extmark', function()
screen:expect({
grid = [[
## grid 1
[4:--------------------]|
[4:--------------------]|
[4:--------------------]|
[4:--------------------]|*3
[No Name] [+] |
[2:--------------------]|
[2:--------------------]|
[2:--------------------]|*2
[No Name] [+] |
[3:--------------------]|
## grid 2

View File

@ -285,12 +285,7 @@ describe('API', function()
meths.exec2("echo 'hello'", { output = false })
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
hello |
]]}
end)
@ -304,10 +299,7 @@ describe('API', function()
meths.exec2("echo 'hello'", { output = true })
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]]}
exec([[
@ -318,10 +310,7 @@ describe('API', function()
feed([[:echon 1 | call Print() | echon 5<CR>]])
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
15 |
]]}
end)
@ -1140,8 +1129,7 @@ describe('API', function()
nvim('paste', '', true, 3)
screen:expect([[
|
~ |
~ |
~ |*2
:Foo^ |
]])
end)
@ -1152,8 +1140,7 @@ describe('API', function()
nvim('paste', 'normal! \023\022\006\027', true, -1)
screen:expect([[
|
~ |
~ |
~ |*2
:normal! ^W^V^F^[^ |
]])
end)
@ -2106,9 +2093,7 @@ describe('API', function()
feed([[:call nvim_out_write("\na\n")<CR>]])
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2: }|
|
a |
@ -2118,8 +2103,7 @@ describe('API', function()
feed([[:call nvim_out_write("b\n\nc\n")<CR>]])
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{2: }|
b |
|
@ -2132,9 +2116,7 @@ describe('API', function()
feed([[:lua vim.api.nvim_out_write('aaa\0bbb\0\0ccc\nddd\0\0\0eee\n')<CR>]])
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2: }|
aaa{3:^@}bbb{3:^@^@}ccc |
ddd{3:^@^@^@}eee |
@ -2161,12 +2143,7 @@ describe('API', function()
nvim_async('err_write', 'has bork\n')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{1:has bork} |
]])
end)
@ -2175,9 +2152,7 @@ describe('API', function()
nvim_async('err_write', 'something happened\nvery bad\n')
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3: }|
{1:something happened} |
{1:very bad} |
@ -2205,12 +2180,7 @@ describe('API', function()
nvim_async('err_write', 'fail\n')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{1:very fail} |
]])
helpers.poke_eventloop()
@ -2219,9 +2189,7 @@ describe('API', function()
nvim_async('err_write', 'more fail\ntoo fail\n')
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3: }|
{1:more fail} |
{1:too fail} |
@ -2234,9 +2202,7 @@ describe('API', function()
nvim_async('err_write', 'aaa\0bbb\0\0ccc\nddd\0\0\0eee\n')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3: }|
{1:aaa^@bbb^@^@ccc} |
{1:ddd^@^@^@eee} |
@ -2274,12 +2240,7 @@ describe('API', function()
feed('<CR>')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
|
]])
end)
@ -2859,8 +2820,7 @@ describe('API', function()
meths.set_current_buf(2)
screen:expect([[
^some text |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]], {
[1] = {bold = true, foreground = Screen.colors.Blue1},
@ -2937,8 +2897,7 @@ describe('API', function()
meths.set_current_buf(edited_buf)
screen:expect([[
^some text |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
eq('nofile', meths.get_option_value('buftype', {buf=edited_buf}))
@ -2950,8 +2909,7 @@ describe('API', function()
command('bwipe')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
end)
@ -3229,12 +3187,7 @@ describe('API', function()
feed(':call nvim_echo([["msg"]], v:false, {})<CR>')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
msg |
]]}
end)
@ -3243,12 +3196,7 @@ describe('API', function()
nvim_async("echo", {{"msg_a"}, {"msg_b", "Statement"}, {"msg_c", "Special"}}, true, {})
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
msg_a{3:msg_b}{4:msg_c} |
]]}
end)
@ -3257,9 +3205,7 @@ describe('API', function()
nvim_async("echo", {{"msg_a\nmsg_a", "Statement"}, {"msg_b", "Special"}}, true, {})
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2: }|
{3:msg_a} |
{3:msg_a}{4:msg_b} |
@ -3338,8 +3284,7 @@ describe('API', function()
{0:~}{3:Press ENTER or type command to continue}{1: }{0: }|
{0:~}{4:term://~/config2/docs/pres//32693:vim --clean +smile 29,39 All}{0: }|
{0:~}{1::call nvim__screenshot("smile2.cat") }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]]}
end)
@ -3367,13 +3312,8 @@ describe('API', function()
screen:expect{grid=[[
|
{0:~}{1:^ }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~}{1: }{0: }|*4
{0:~ }|*3
|
]]}
@ -3381,13 +3321,8 @@ describe('API', function()
screen:expect{grid=[[
|
{0:~}{7: }{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~}{1: }{0: }|*4
{0:~ }|*3
{6:-- TERMINAL --} |
]]}
@ -3400,13 +3335,8 @@ describe('API', function()
screen:expect{grid=[[
|
{0:~}{1:herrejösses!}{7: }{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~}{1: }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~}{1: }{0: }|*4
{0:~ }|*3
{6:-- TERMINAL --} |
]]}
eq('ba\024blaherrejösses!', exec_lua [[ return stream ]])
@ -4159,8 +4089,7 @@ describe('API', function()
screen:expect([[
foo |
bar |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
Entering Ex mode. Type "visual" to go to Normal mode. |
:1^ |
@ -4518,10 +4447,7 @@ describe('API', function()
meths.cmd({cmd = 'echo', args = {[['hello']]}}, {output = true})
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]]}
exec([[
@ -4532,10 +4458,7 @@ describe('API', function()
feed([[:echon 1 | call Print() | echon 5<CR>]])
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
15 |
]]}
end)

View File

@ -96,14 +96,7 @@ describe('API/win', function()
screen:expect{grid=[[
^prologue |
|
|
|
|
|
|
|
|
|*8
]]}
-- cursor position is at beginning
eq({1, 0}, window('get_cursor', win))
@ -111,13 +104,7 @@ describe('API/win', function()
-- move cursor to end
window('set_cursor', win, {101, 0})
screen:expect{grid=[[
|
|
|
|
|
|
|
|*7
^epilogue |
|
]]}
@ -126,14 +113,7 @@ describe('API/win', function()
window('set_cursor', win, {1, 0})
screen:expect{grid=[[
^prologue |
|
|
|
|
|
|
|
|
|*8
]]}
-- move focus to new window
@ -144,12 +124,10 @@ describe('API/win', function()
eq({1, 0}, window('get_cursor', win))
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
prologue |
|
|
|*2
{3:[No Name] [+] }|
|
]]}
@ -158,11 +136,9 @@ describe('API/win', function()
window('set_cursor', win, {101, 0})
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
|
|
|*2
epilogue |
{3:[No Name] [+] }|
|
@ -172,12 +148,10 @@ describe('API/win', function()
window('set_cursor', win, {1, 0})
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
prologue |
|
|
|*2
{3:[No Name] [+] }|
|
]]}
@ -232,8 +206,7 @@ describe('API/win', function()
bbb │bbb |
ccc │ccc |
{2:dd^d }│{2:ddd }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*2
{3:[No Name] [+] 4,3 All }{4:[No Name] [+] 4,3 All}|
|
]])
@ -243,8 +216,7 @@ describe('API/win', function()
bbb │bbb |
ccc │ccc |
{2:dd^d }│ddd |
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*2
{3:[No Name] [+] 4,3 All }{4:[No Name] [+] 1,1 All}|
|
]])
@ -272,8 +244,7 @@ describe('API/win', function()
bb{2:b} │bb{2:b} |
cc{2:c} │cc{2:c} |
dd^d │ddd |
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*2
{3:[No Name] [+] }{4:[No Name] [+] }|
|
]])
@ -283,8 +254,7 @@ describe('API/win', function()
bb{2:b} │bbb |
cc{2:c} │{2:c}cc |
dd^d │{2:d}dd |
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*2
{3:[No Name] [+] }{4:[No Name] [+] }|
|
]])

View File

@ -272,42 +272,22 @@ describe('autocmd', function()
]])
screen:expect([[
^bb |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
|
]])
feed(":enew | doautoall User<cr>")
screen:expect([[
{2:bb }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{3:~ }|*4
{1:~ }|*4
^:enew | doautoall User |
]])
feed('<cr>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
13 |
]])
eq(7, eval('g:test'))
@ -323,28 +303,15 @@ describe('autocmd', function()
feed(":doautoall User<cr>")
screen:expect([[
{2:bb }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{3:~ }|*4
{1:~ }|*4
^:doautoall User |
]])
feed('<cr>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
13 |
]])
-- win vars in aucmd_win should have been reset
@ -373,11 +340,7 @@ describe('autocmd', function()
]]
screen:expect [[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{3:[No Name] }|
|
{2:[No Name] }|

View File

@ -68,9 +68,7 @@ describe('cmdline autocommands', function()
feed(':')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{4: }|
: |
{2:CmdlineEnter Autocommands for "*": Vim(echoerr):FAIL} |
@ -94,11 +92,7 @@ describe('cmdline autocommands', function()
screen:expect([[
|
^lorem ipsum |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
@ -160,10 +154,7 @@ describe('cmdline autocommands', function()
|
lorem ipsum |
^lorem ipsum. |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
end)

View File

@ -40,9 +40,7 @@ describe('autoread TUI FocusGained/FocusLost', function()
screen:expect{grid=[[
{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*3
{5:[No Name] }|
|
{3:-- TERMINAL --} |
@ -50,9 +48,7 @@ describe('autoread TUI FocusGained/FocusLost', function()
feed_command('edit '..path)
screen:expect{grid=[[
{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*3
{5:xtest-foo }|
:edit xtest-foo |
{3:-- TERMINAL --} |
@ -61,9 +57,7 @@ describe('autoread TUI FocusGained/FocusLost', function()
feed_data('\027[O')
screen:expect{grid=[[
{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*3
{5:xtest-foo }|
:edit xtest-foo |
{3:-- TERMINAL --} |

View File

@ -79,10 +79,7 @@ describe(":autocmd", function()
feed('q')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
end)

View File

@ -271,8 +271,7 @@ describe('fileio', function()
command("e Xtest-overwrite-forced")
screen:expect([[
^foobar |
{1:~ }|
{1:~ }|
{1:~ }|*2
"Xtest-overwrite-forced" [noeol] 1L, 6B |
]])
@ -296,16 +295,14 @@ describe('fileio', function()
feed("<cr>")
screen:expect([[
^foobar |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
-- Use a screen test because the warning does not set v:errmsg.
command("w!")
screen:expect([[
^foobar |
{1:~ }|
{1:~ }|
{1:~ }|*2
<erwrite-forced" [noeol] 1L, 6B written |
]])
end)

View File

@ -894,8 +894,7 @@ describe('jobs', function()
feed_command('call PrintAndWait()')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
aaa |
bbb |
@ -1151,10 +1150,7 @@ describe("pty process teardown", function()
screen:attach()
screen:expect([[
^ |
~ |
~ |
~ |
~ |
~ |*4
|
]])
end)
@ -1173,10 +1169,7 @@ describe("pty process teardown", function()
screen:expect([[
^ |
[Process exited 0] |
|
|
|
|
|*4
]])
end)
end)

View File

@ -73,10 +73,7 @@ describe('command-line option', function()
})
screen:expect([[
{1:^ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*4
{3:[No Name] 0,0-1 All}|
{1: }|
|
@ -89,11 +86,7 @@ describe('command-line option', function()
screen:expect([[
|
[Process exited 1] |
|
|
|
|
|
|*5
-- TERMINAL -- |
]])
--[=[ Example of incorrect output:
@ -104,8 +97,7 @@ describe('command-line option', function()
LENO' failed. |
|
[Process exited 6] |
|
|
|*2
]])
]=]
end)

View File

@ -49,8 +49,7 @@ describe('startup', function()
funcs.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) |
|
|
|*2
]])
end)
@ -92,12 +91,9 @@ describe('startup', function()
funcs.chansend(id, 'cont\n')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
[No Name] |
|
|
|*2
]])
end)
end)
@ -497,11 +493,9 @@ describe('startup', function()
funcs.chansend(id, '\n')
screen:expect([[
^ |
~ |
~ |
~ |*2
[No Name] |
|
|
|*2
]])
end)
@ -907,10 +901,7 @@ describe('user config init', function()
feed('ia')
screen:expect([[
|
~ |
~ |
~ |
~ |
~ |*4
[No Name] 0,0-1 All|
|
-- TERMINAL -- |
@ -918,10 +909,7 @@ describe('user config init', function()
feed(':echo g:exrc_file<CR>')
screen:expect(string.format([[
|
~ |
~ |
~ |
~ |
~ |*4
[No Name] 0,0-1 All|
%s%s|
-- TERMINAL -- |

View File

@ -41,22 +41,14 @@ describe('completion', function()
screen:expect([[
foo |
foo^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- Keyword Local completion (^N^P) The only match} |
]])
feed('<C-e>')
screen:expect([[
foo |
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- INSERT --} |
]])
feed('<ESC>')
@ -112,10 +104,7 @@ describe('completion', function()
foo^ |
{2:bar foobaz baz }{0: }|
{1:abbr kind menu }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- Omni completion (^O^N^P) }{4:match 1 of 2} |
]])
eq({word = 'foo', abbr = 'bar', menu = 'baz',
@ -140,11 +129,7 @@ describe('completion', function()
screen:expect([[
foo |
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- INSERT --} |
]])
feed('<C-x>')
@ -152,11 +137,7 @@ describe('completion', function()
screen:expect([[
foo |
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)} |
]])
feed('<C-n>')
@ -164,10 +145,7 @@ describe('completion', function()
foo |
foo^ |
{2:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- Keyword Local completion (^N^P) The only match} |
]])
feed('bar<ESC>')
@ -178,9 +156,7 @@ describe('completion', function()
foobar |
foo^ |
{2:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- INSERT --} |
]])
eq('foo', eval('getline(3)'))
@ -192,34 +168,24 @@ describe('completion', function()
foo |
^ |
{2:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- Keyword Local completion (^N^P) The only match} |
]])
feed('<C-y>')
screen:expect([[
foo |
foo^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- INSERT --} |
]])
feed('<ESC>')
eq('foo', eval('getline(2)'))
feed('o<C-r>=TestComplete()<CR>')
screen:expect([[
foo |
foo |
foo |*2
^ |
{2:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- INSERT --} |
]])
feed('<C-y><ESC>')
@ -232,21 +198,14 @@ describe('completion', function()
foo |
^ |
{1:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- Keyword Local completion (^N^P) }{5:Back at original} |
]])
feed('b')
screen:expect([[
foo |
b^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- Keyword Local completion (^N^P) }{5:Back at original} |
]])
feed('ar<ESC>')
@ -257,9 +216,7 @@ describe('completion', function()
bar |
^ |
{1:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- INSERT --} |
]])
feed('bar<ESC>')
@ -272,21 +229,14 @@ describe('completion', function()
foo |
^ |
{1:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- Keyword Local completion (^N^P) }{5:Back at original} |
]])
feed('<ESC>')
screen:expect([[
foo |
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
|
]])
eq('', eval('getline(2)'))
@ -296,9 +246,7 @@ describe('completion', function()
|
^ |
{1:foo }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- INSERT --} |
]])
feed('<ESC>')
@ -306,10 +254,7 @@ describe('completion', function()
foo |
|
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]])
eq('', eval('getline(3)'))
@ -438,33 +383,20 @@ describe('completion', function()
screen:expect([[
ug^ |
{1:August }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- User defined completion (^U^N^P) }{5:Back at original} |
]])
feed('<Down>')
screen:expect([[
ug^ |
{2:August }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- User defined completion (^U^N^P) The only match} |
]])
feed('<C-y>')
screen:expect([[
August^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{3:-- INSERT --} |
]])
expect('August')
@ -476,10 +408,7 @@ describe('completion', function()
|
Ja^ |
{1:January }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- User defined completion (^U^N^P) }{5:Back at original} |
]])
feed('<BS>')
@ -489,8 +418,7 @@ describe('completion', function()
{1:January }{0: }|
{1:June }{0: }|
{1:July }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:-- User defined completion (^U^N^P) }{5:Back at original} |
]])
feed('<C-n>')
@ -500,8 +428,7 @@ describe('completion', function()
{2:January }{0: }|
{1:June }{0: }|
{1:July }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:-- User defined completion (^U^N^P) }{4:match 1 of 3} |
]])
feed('<C-n>')
@ -511,19 +438,14 @@ describe('completion', function()
{1:January }{0: }|
{2:June }{0: }|
{1:July }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:-- User defined completion (^U^N^P) }{4:match 2 of 3} |
]])
feed('<Esc>')
screen:expect([[
|
Jun^e |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
|
]])
feed('.')
@ -531,10 +453,7 @@ describe('completion', function()
|
June |
Jun^e |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]])
expect([[
@ -705,12 +624,7 @@ describe('completion', function()
feed('<cr>')
screen:expect([[
96^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{3:-- INSERT --} |
]])
end)
@ -748,10 +662,7 @@ describe('completion', function()
inc uninc indent unindent |
ind^ |
{2:indent }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- Keyword Local completion (^N^P) }{4:match 1 of 2} |
]])
@ -760,11 +671,7 @@ describe('completion', function()
screen:expect([[
inc uninc indent unindent |
indent^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- INSERT --} |
]])
-- Indents when completion is exited using ESC.
@ -773,10 +680,7 @@ describe('completion', function()
inc uninc indent unindent |
indent |
in^d |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]])
-- Works for unindenting too.
@ -789,8 +693,7 @@ describe('completion', function()
ind |
unind^ |
{0:~ }{2: unindent }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:-- Keyword Local completion (^N^P) }{4:match 1 of 2} |
]])
-- Works when going back and forth.
@ -801,8 +704,7 @@ describe('completion', function()
ind |
uninc^ |
{0:~ }{2: uninc }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:-- Keyword Local completion (^N^P) }{4:match 1 of 2} |
]])
feed("<BS>d")
@ -812,8 +714,7 @@ describe('completion', function()
ind |
unind^ |
{0:~ }{2: unindent }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:-- Keyword Local completion (^N^P) }{4:match 1 of 2} |
]])
feed("<C-N><C-N><C-Y><Esc>")
@ -822,9 +723,7 @@ describe('completion', function()
indent |
ind |
uninden^t |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]])
end)
@ -835,22 +734,14 @@ describe('completion', function()
screen:expect([[
^foo |
bar |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
|
]])
feed('A<C-x><C-l>')
screen:expect([[
foo^ |
bar |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- Whole line completion (^L^N^P) }{7:Pattern not found} |
]])
eq(-1, eval('foldclosed(1)'))
@ -865,9 +756,7 @@ describe('completion', function()
fooegg^ |
{1:foobar }{0: }|
{2:fooegg }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- Keyword completion (^N^P) }{4:match 1 of 2} |
]])
@ -878,9 +767,7 @@ describe('completion', function()
fooegg^ |
{1:foobar }{0: }|
{2:fooegg }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- Keyword completion (^N^P) }{4:match 1 of 2} |
]], unchanged=true}
@ -891,9 +778,7 @@ describe('completion', function()
foobar^ |
{2:foobar }{0: }|
{1:fooegg }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- Keyword completion (^N^P) }{4:match 2 of 2} |
]])
end)
@ -904,12 +789,7 @@ describe('completion', function()
feed(':lua CURRENT_TESTING_<TAB>')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
:lua CURRENT_TESTING_VAR^ |
]]}
end)
@ -920,11 +800,7 @@ describe('completion', function()
feed(':lua CURRENT_TESTING_<TAB>')
screen:expect{ grid = [[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{10:CURRENT_TESTING_BAR}{9: CURRENT_TESTING_FOO }|
:lua CURRENT_TESTING_BAR^ |
]], unchanged = true }
@ -958,9 +834,7 @@ describe('completion', function()
|
{8:[No Name] }|
{0::}foo faa fee f^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{9:[Command Line] }|
{3:-- INSERT --} |
]] )
@ -980,9 +854,7 @@ describe('completion', function()
|
{8:[No Name] }|
{0::}foo faa fee foo |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{9:[Command Line] }|
:foo faa fee foo^ |
]])
@ -1015,11 +887,7 @@ describe('completion', function()
screen:expect([[
^ |
{1:1 3 2 }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- INSERT --} |
]])
end)
@ -1062,9 +930,7 @@ describe('completion', function()
bar |
foobar |
f^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- Keyword completion (^N^P) }{5:Back at original} |
]], popupmenu = {
anchor = { 1, 3, 0 },
@ -1081,9 +947,7 @@ describe('completion', function()
bar |
foobar |
foob^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- Keyword completion (^N^P) }{5:Back at original} |
]], popupmenu = {
anchor = { 1, 3, 0 },
@ -1175,12 +1039,7 @@ describe('completion', function()
{2:hello }{0: }|
{1:hullo }{0: }|
{1:heeee }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{3:-- }{4:match 1 of 3} |
]])
command([[call timer_start(100, { -> execute('stopinsert') })]])
@ -1191,15 +1050,7 @@ describe('completion', function()
hullo |
heee^e |
hello |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*9
|
]])
end)
@ -1239,9 +1090,7 @@ describe('completion', function()
{1:bar }{0: }|
{1:foa }{0: }|
{1:.hidden }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:-- }{4:match 1 of 4} |
]]}
feed('<Esc>ccf<C-n>')
@ -1249,11 +1098,7 @@ describe('completion', function()
foo^ |
{2:foo }{0: }|
{1:foa }{0: }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{3:-- }{4:match 1 of 2} |
]]}
end)

View File

@ -64,10 +64,7 @@ describe("CTRL-C (mapped)", function()
feed('i')
screen:expect([[
^ |
~ |
~ |
~ |
~ |
~ |*4
-- INSERT -- |
]])
end)
@ -82,10 +79,7 @@ describe("CTRL-C (mapped)", function()
feed('i')
screen:expect([[
^ |
~ |
~ |
~ |
~ |
~ |*4
-- INSERT -- |
]])
end)

View File

@ -419,9 +419,7 @@ describe('named marks view', function()
feed("<C-w>p'a")
screen:expect([[
|
~ |
~ |
~ |
~ |*3
[No Name] |
6 line |
^7 line |
@ -454,10 +452,7 @@ describe('named marks view', function()
command('bwipe!')
screen:expect([[
^ |
~ |
~ |
~ |
~ |
~ |*4
|
]])
command('rshada!')

View File

@ -65,19 +65,13 @@ describe('insert-mode', function()
feed('i<C-R>')
screen:expect([[
{1:^"} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- INSERT --} |
]])
feed('={}')
screen:expect([[
{1:"} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
={2:{}}^ |
]])
feed('<CR>')
@ -92,10 +86,7 @@ describe('insert-mode', function()
feed('<CR>')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- INSERT --} |
]])
end)

View File

@ -116,10 +116,7 @@ describe('tabpage', function()
screen:expect([[
{4: [No Name] }{3: [No Name] }{2: }{4:X}|
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{1:[No Name] }|
"[No Name]" --No lines in buffer-- |
]])
@ -127,10 +124,7 @@ describe('tabpage', function()
screen:expect([[
{4: [No Name] }{3: }{5:2}{3: [No Name] }{2: }{4:X}|
^ │ |
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|*4
{1:[No Name] }|
"[No Name]" --No lines in buffer-- |
]])

View File

@ -78,11 +78,7 @@ describe('the first line is redrawn correctly after inserting text in an empty b
screen:expect([[
aaaaa |
^bbbbb |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
end)
@ -96,11 +92,7 @@ describe('the first line is redrawn correctly after inserting text in an empty b
screen:expect([[
aaaaa |
^bbbbb |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
end)

View File

@ -69,11 +69,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
^some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{6:<F3>} {6:*} {6:<Cmd>}let m = mode(1){6:<CR>} |
]])
end)
@ -85,11 +81,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
^some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{2:E1136: <Cmd> mapping must end with <CR> before second <Cmd>} |
]])
@ -98,11 +90,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
^some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{2:E1255: <Cmd> mapping must end with <CR>} |
]])
eq(0, eval('x'))
@ -114,11 +102,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
^of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
@ -127,11 +111,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of ^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
end)
@ -247,11 +227,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
so{5:me short lines} |
{5:of }^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- VISUAL --} |
]])
feed('<esc>')
@ -269,11 +245,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of alpha^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- INSERT --} |
]])
-- feedkeys were not executed immediately
@ -285,11 +257,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of alphabet^atest text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
-- feedkeys(..., 'x') was executed immediately, but insert mode gets aborted
@ -310,9 +278,7 @@ describe('mappings with <Cmd>', function()
aa |
xx |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
:normal ,x |
]])
@ -325,9 +291,7 @@ describe('mappings with <Cmd>', function()
aa |
xx |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
:normal ,x |
]])
@ -336,11 +300,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
^ |
0 |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
--No lines in buffer-- |
]])
@ -364,11 +324,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some short }^lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- VISUAL --} |
]])
eq('v', funcs.mode(1))
@ -383,8 +339,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some }short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7: }|
{2:Error detected while processing :} |
{2:E605: Exception not caught: very error} |
@ -396,11 +351,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some }^short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- VISUAL --} |
]])
eq('v', funcs.mode(1))
@ -408,11 +359,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
so{5:me short lines} |
{5:of }^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- VISUAL --} |
]])
eq('v', funcs.mode(1))
@ -422,11 +369,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
so{5:me short lines} |
{5:of }^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- (insert) VISUAL --} |
]])
eq('v', eval('mode(1)'))
@ -442,11 +385,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some short }^lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- SELECT --} |
]])
eq('s', funcs.mode(1))
@ -466,8 +405,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some }short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7: }|
{2:Error detected while processing :} |
{2:E605: Exception not caught: very error} |
@ -479,11 +417,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some }^short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- VISUAL --} |
]])
-- quirk: restoration of select mode is not performed
@ -494,8 +428,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some }short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7: }|
{2:Error detected while processing :} |
{2:E605: Exception not caught: very error} |
@ -507,11 +440,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
{5:some }^short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- SELECT --} |
]])
-- quirk: restoration of select mode is not performed
@ -521,11 +450,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
so{5:me short lines} |
{5:of }^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- SELECT --} |
]])
eq('s', funcs.mode(1))
@ -535,11 +460,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
so{5:me short lines} |
{5:of }^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- (insert) SELECT --} |
]])
eq('s', eval('mode(1)'))
@ -568,8 +489,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7: }|
{2:Error detected while processing :} |
{2:E605: Exception not caught: very error} |
@ -600,11 +520,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
indeed some short little ^lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- INSERT --} |
]])
@ -612,8 +528,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
indeed some short little lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7: }|
{2:Error detected while processing :} |
{2:E605: Exception not caught: very error} |
@ -627,11 +542,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
indeed some short little ^lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- INSERT --} |
]])
eq('i', eval('mode(1)'))
@ -643,11 +554,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
in{5:deed some short little lines} |
{5:of stuff }^test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- INSERT VISUAL --} |
]])
expect([[
@ -661,11 +568,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
in^deed some short little lines |
of stuff test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- INSERT --} |
]])
eq('i', eval('mode(1)'))
@ -675,11 +578,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
in bar ^deed some short little lines |
of stuff test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- INSERT --} |
]])
eq(17, eval('g:y'))
@ -700,9 +599,7 @@ describe('mappings with <Cmd>', function()
some^ |
{8:some } |
{9:short }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{4:-- Keyword Local completion (^N^P) }{3:match 1 of 2} |
]])
@ -717,9 +614,7 @@ describe('mappings with <Cmd>', function()
some^ |
{9:some } |
{9:short }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{4:-- Keyword Local completion (^N^P) }{10:Back at original} |
]])
end)
@ -734,11 +629,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
^some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{2:E492: Not an editor command: text} |
]])
@ -773,11 +664,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
^some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
eq('n', eval('mode(1)'))
@ -786,11 +673,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
:let g:x = 3^ |
]])
feed('+2<cr>')
@ -798,11 +681,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short ^lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
:let g:x = 3+2 |
]])
eq(5, eval('g:x'))
@ -811,11 +690,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
:let g:y = 7^ |
]])
eq('c', eval('mode(1)'))
@ -824,11 +699,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short ^lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{4:-- INSERT --} |
]])
eq('i', eval('mode(1)'))
@ -842,11 +713,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
:bar^ |
]])
@ -854,11 +721,7 @@ describe('mappings with <Cmd>', function()
screen:expect([[
some short lines |
of test text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
:barx^ |
]])
end)

View File

@ -20,14 +20,7 @@ describe(':debug', function()
feed(':echoerr bork<cr>')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
{2: }|
{3:E121: Undefined variable: bork}|
|
@ -38,11 +31,7 @@ describe(':debug', function()
feed(':debug echo "aa"| echo "bb"<cr>')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{2: }|
{3:E121: Undefined variable: bork}|
|
@ -56,8 +45,7 @@ describe(':debug', function()
feed('step<cr>')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|*2
{2: }|
{3:E121: Undefined variable: bork}|
|
@ -92,18 +80,7 @@ describe(':debug', function()
feed('<cr>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*12
|
]])
end)

View File

@ -23,13 +23,7 @@ describe(":drop", function()
feed_command("drop tmp1.vim")
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*7
{1:tmp1.vim }|
"tmp1.vim" [New] |
]])
@ -42,13 +36,7 @@ describe(":drop", function()
feed_command("drop tmp1")
screen:expect([[
│^ |
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|*7
{2:tmp2 }{1:tmp1 }|
:drop tmp1 |
]])
@ -63,13 +51,10 @@ describe(":drop", function()
feed_command("drop tmp3")
screen:expect([[
^ │ |
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|*3
{1:tmp3 }│{0:~ }|
ABC │{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|*2
{2:tmp2 [+] tmp1 }|
"tmp3" [New] |
]])

View File

@ -105,25 +105,19 @@ describe('Screen', function()
command('map <expr> x input("> ")')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
|
]])
feed('x')
screen:expect([[
|
~ |
~ |
~ |
~ |*3
> ^ |
]])
feed('\n')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
> |
]])
end)
@ -133,25 +127,19 @@ describe('Screen', function()
feed('i')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
feed('x')
screen:expect([[
|
~ |
~ |
~ |
~ |*3
> ^ |
]])
feed('\n')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
end)
@ -161,9 +149,7 @@ describe('Screen', function()
feed(':<F2>')
screen:expect([[
|
~ |
~ |
~ |
~ |*3
:^ |
]])
end)
@ -201,8 +187,7 @@ describe('Screen', function()
command('nmap <expr> <F2> execute("throw 42")')
feed('<F2>')
screen:expect([[
|
|
|*2
Error detected while processing : |
E605: Exception not caught: 42 |
Press ENTER or type command to continue^ |
@ -210,9 +195,7 @@ describe('Screen', function()
feed('<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
|
]])
end)
@ -223,9 +206,7 @@ describe('Screen', function()
feed(':echo "foo')
screen:expect([[
|
~ |
~ |
~ |
~ |*3
:echo "foo^ |
]])
feed('<F2>')
@ -261,9 +242,7 @@ describe('Screen', function()
feed(': nmap a<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
n a b |
]])
end)

View File

@ -209,9 +209,7 @@ describe(':mksession', function()
^/ |
|
[Process exited 0] |
|
|
|
|*3
]]
command('cd /')

View File

@ -137,10 +137,7 @@ it(':vimgrep can specify Unicode pattern without delimiters', function()
feed('i→<Esc>:vimgrep →')
screen:expect([[
{1:→} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
:vimgrep →^ |
]])
end)

View File

@ -266,22 +266,7 @@ describe('swapfile detection', function()
feed(':<CR>')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*16
: |
]])
nvim1:close()
@ -303,22 +288,7 @@ describe('swapfile detection', function()
command([[echo 'hello']])
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*16
hello |
]])
nvim2:close()

View File

@ -26,9 +26,7 @@ describe('063: Test for ":match", "matchadd()" and related functions', function(
command("call matchaddpos('MyGroup1', [[1, 5], [1, 8, 3]], 10, 3)")
screen:expect([[
abcd{1:e}fg{1:hij}klmnop^q |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]])
@ -37,9 +35,7 @@ describe('063: Test for ":match", "matchadd()" and related functions', function(
command("call matchaddpos('MyGroup1', [[1, 4, 2], [1, 9, 2]])")
screen:expect([[
abc{1:dΣ}ab{1:cd}e^f |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]])
end)

View File

@ -50,15 +50,7 @@ describe('107', function()
[1, '1 '] |
[50, '50 '] |
^[59, '59 '] |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*9
3 more lines |
]])
end)

View File

@ -33,10 +33,7 @@ describe('argument list commands', function()
feed('N')
screen:expect([[
^ |
~ |
~ |
~ |
~ |
~ |*4
|
]])
feed(':confirm quit\n')

View File

@ -30,9 +30,7 @@ describe('breakindent', function()
screen:expect([[
{1: }xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxX|
{1: }^second line |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:-- INSERT --} |
]])
-- No line wraps, so changing 'showbreak' should lead to the same screen.
@ -47,8 +45,7 @@ describe('breakindent', function()
{1: }xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxX|
{1: } {0:+^$} |
{1: }second line{0:$} |
{0:~ }|
{0:~ }|
{0:~ }|*2
{2:-- INSERT --} |
]]}
command('setlocal nobreakindent')
@ -56,8 +53,7 @@ describe('breakindent', function()
{1: }xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxX|
{1: }{0:+^$} |
{1: }second line{0:$} |
{0:~ }|
{0:~ }|
{0:~ }|*2
{2:-- INSERT --} |
]]}
end)

View File

@ -40,13 +40,7 @@ describe('cmdline', function()
screen:expect{grid=[[
{1: + [No Name] }{2: [No Name] }{3: }{1:X}|
^ |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*7
:tabnew |
]]}
@ -54,14 +48,8 @@ describe('cmdline', function()
screen:expect{grid=[[
{1: + [No Name] }{2: [No Name] }{3: }{1:X}|
^ |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
|
|
|
{4:~ }|*5
|*3
]]}
feed [[gt]]
@ -82,14 +70,8 @@ describe('cmdline', function()
screen:expect([[
{1: + [No Name] }{2: [No Name] }{3: }{1:X}|
^ |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
|
|
|
{4:~ }|*5
|*3
]])
end)
@ -105,8 +87,7 @@ describe('cmdline', function()
feed_command('DoSomething')
screen:expect([[
|
~ |
~ |
~ |*2
|
Executing: DoSomething |
Executing: echo 'hello' |set ts=4 |let v = '123' |echo v |
@ -135,9 +116,7 @@ describe('cmdline', function()
screen:expect([[
{1:foo }|
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
:^ |
]])
end)
@ -156,9 +135,7 @@ describe('cmdline', function()
feed(':for i in range(3)<CR>')
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
:for i in range(3) |
: ^ |
]])
@ -166,9 +143,7 @@ describe('cmdline', function()
-- Note: this may still be considered broken, ref #18140
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
: :let i =^ |
|
]])
@ -194,22 +169,14 @@ describe('cmdline', function()
feed(':call EchoTwo()')
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{1:[No Name] }|
:call EchoTwo()^ |
]])
feed('<CR>')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{1:[No Name] }|
|
]])
@ -231,10 +198,7 @@ describe('cmdline', function()
screen:expect([[
{2: [No Name] }{3: }|
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{1:[No Name] }|
|
]])
@ -281,58 +245,27 @@ describe('cmdwin', function()
feed('q')
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:[No Name] }|
{0::}^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{1:[Command Line] }|
|
]])
feed([[aecho 'done']])
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:[No Name] }|
{0::}echo 'done'^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{1:[Command Line] }|
{4:-- INSERT --} |
]])
feed('<CR>')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*14
done |
]])
end)

View File

@ -416,10 +416,7 @@ describe('Conceal', function()
two two two two |hidden| ^here two two |
three three three three {1:t}hree |
{0: >>> }thre{2:e} three three three |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
/here |
]])
@ -431,10 +428,7 @@ describe('Conceal', function()
two two two two |hidden| here two tw^o |
three three three three three |
{0: >>> }thre{2:e} three three three |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
/here |
]])
end)
@ -455,21 +449,14 @@ describe('Conceal', function()
]])
screen:expect([[
one two three four five, the ^backticks should be concealed |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]])
screen:try_resize(75, 7)
screen:expect([[
one two three four five, the ^backticks should be concealed |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
|
]])
end)
@ -501,8 +488,7 @@ describe('Conceal', function()
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
{0:+ }bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
{0:+ }cccccc |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]])
end)

View File

@ -15,19 +15,13 @@ describe('cpoptions', function()
feed('c2w')
screen:expect([[
^one tw$ three |
~ |
~ |
~ |
~ |
~ |*4
-- INSERT -- |
]])
feed('vim<Esc>')
screen:expect([[
vi^m three |
~ |
~ |
~ |
~ |
~ |*4
|
]])
end)

View File

@ -32,14 +32,7 @@ describe('debugger', function()
feed(':source %<CR>')
screen:expect{grid=[[
^let g:Xtest_var += 1{MATCH: *}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|*8
:source %{MATCH: *}|
]]}
feed(':source %<CR>')
@ -58,14 +51,7 @@ describe('debugger', function()
feed('cont<CR>')
screen:expect{grid=[[
^let g:Xtest_var += 1{MATCH: *}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|
{0:~{MATCH: *}}|*8
{MATCH: *}|
]]}
feed(':source %<CR>')

View File

@ -18,28 +18,19 @@ describe('digraph', function()
feed('i<C-K>')
screen:expect([[
{1:^?} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:-- INSERT --}|
]])
feed('1')
screen:expect([[
{1:^1} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:-- INSERT --}|
]])
feed('2')
screen:expect([[
½^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:-- INSERT --}|
]])
end)

View File

@ -48,12 +48,7 @@ describe('display', function()
feed('VG7kk')
screen:expect([[
{3: }^f{2:oo} |
{3: }foo |
{3: }foo |
{3: }foo |
{3: }foo |
{3: }foo |
{3: }foo |
{3: }foo |*6
{1:-- VISUAL LINE --} |
]])
end)
@ -80,12 +75,9 @@ describe('display', function()
end
screen:expect((([[
^a│aaa |
a│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
a│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
a│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*2
b│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
b│{1:~ }|
b│{1:~ }|
b│{1:~ }|
b│{1:~ }|*3
{1:@}│{1:~ }|
{2:< }{3:[No Name] [+] }|
|
@ -97,12 +89,9 @@ describe('display', function()
command('100wincmd >')
screen:expect((([[
^aaa │a|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│a|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│a|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│a|*2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb │b|
{1:~ }│b|
{1:~ }│b|
{1:~ }│b|
{1:~ }│b|*3
{1:~ }│{1:@}|
{2:[No Name] [+] }{3:<}|
|
@ -119,8 +108,7 @@ describe('display', function()
{1:@@@ }|
{2:[No Name] [+] }|
aaa |
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
{3:[No Name] [+] }|
|
@ -133,9 +121,7 @@ describe('display', function()
a │bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bb│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bb│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
bb│{1:~ }|
bb│{1:~ }|
bb│{1:~ }|
bb│{1:~ }|*3
{1:@@}│{1:~ }|
{2:< }{3:[No Name] [+] }|
|
@ -164,17 +150,7 @@ describe('display', function()
feed('736|')
screen:expect([[
<<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|*11
^aaaaaaaaaaaaaaa |
|
]])
@ -182,16 +158,7 @@ describe('display', function()
feed('D')
screen:expect([[
<<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|*10
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^a|
bbbbb bbbbb bbbbb bbbbb bbbbb bb@@@|
|
@ -205,29 +172,14 @@ describe('display', function()
bbbbb ccccc ccccc ccccc ccccc cccc|
c ccccc ccccc ddddd ddddd ddddd ddd|
dd ddddd ddddd ddddd |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*8
|
]])
-- "w_skipcol" is reset to bring the entire topline into view because
-- the line length is now smaller than the current skipcol + marker.
feed('x')
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|*9
aa^a |
bbbbb bbbbb bbbbb bbbbb bbbbb bbbbb|
bbbbb ccccc ccccc ccccc ccccc cccc|
@ -246,11 +198,7 @@ describe('display', function()
]])
screen:expect([[
<<<bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*5
b^b |
|
]])
@ -260,12 +208,7 @@ describe('display', function()
feed('$0')
screen:expect([[
<<<b^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6
|
]])
-- Going to the start of the line with "b" did not set w_skipcol correctly with 'smoothscroll'.
@ -273,24 +216,14 @@ describe('display', function()
feed('$b')
screen:expect([[
2 b ^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6
|
]])
-- Same for "ge".
feed('$ge')
screen:expect([[
2 ^b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6
|
]])
end)

View File

@ -39,19 +39,13 @@ describe('edit', function()
feed('a<C-R>')
screen:expect([[
{1:^"} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:-- INSERT --}|
]])
feed('=')
screen:expect([[
{1:"} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
=^ |
]])
end)
@ -73,19 +67,13 @@ describe('edit', function()
feed('i<C-R>')
screen:expect([[
{1:^"} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- INSERT --} |
]])
feed('={}')
screen:expect([[
{1:"} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
={2:{}}^ |
]])
-- trying to insert a dictionary produces an error
@ -102,20 +90,14 @@ describe('edit', function()
feed(':')
screen:expect([[
:^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:-- INSERT --} |
]])
-- ending Insert mode should put the cursor back on the ':'
feed('<Esc>')
screen:expect([[
^: |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]])
end)

View File

@ -118,8 +118,7 @@ describe('Ex mode', function()
{1: 1 }foo bar |
{1: 2 }foo foo |
{1: 3 }^foo foo |
{2:~ }|
{2:~ }|
{2:~ }|*2
|
]])
end)
@ -166,10 +165,7 @@ describe('Ex mode', function()
feed('vi<CR>')
screen:expect([[
^foo |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
end)

View File

@ -74,21 +74,13 @@ describe(':confirm command dialog', function()
feed(':confirm qall\n')
screen:expect([[
bar2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm qall |
{3:Save changes to "Xbar"?} |
@ -112,21 +104,13 @@ describe(':confirm command dialog', function()
feed(':confirm qall\n')
screen:expect([[
bar3 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo3 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm qall |
{3:Save changes to "Xbar"?} |
@ -150,21 +134,13 @@ describe(':confirm command dialog', function()
feed(':confirm qall\n')
screen:expect([[
bar4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm qall |
{3:Save changes to "Xbar"?} |
@ -173,17 +149,10 @@ describe(':confirm command dialog', function()
feed('N')
screen:expect([[
bar4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{1: }|
@ -215,9 +184,7 @@ describe(':confirm command dialog', function()
feed(':confirm close\n')
screen:expect([[
abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:[No Name] [+] }|
|
{1: }|
@ -228,22 +195,17 @@ describe(':confirm command dialog', function()
feed('C')
screen:expect([[
^abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:[No Name] [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{2:[No Name] }|
|
]])
feed(':confirm close\n')
screen:expect([[
abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:[No Name] [+] }|
|
{1: }|
@ -254,14 +216,7 @@ describe(':confirm command dialog', function()
feed('N')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*8
|
]])
end)
@ -280,9 +235,7 @@ describe(':confirm command dialog', function()
feed(':confirm q\n')
screen:expect([[
foo |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1: }|
:confirm q |
{3:Save changes to "Untitled"?} |
@ -291,12 +244,7 @@ describe(':confirm command dialog', function()
feed('C')
screen:expect([[
^abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
|
]])
@ -304,9 +252,7 @@ describe(':confirm command dialog', function()
feed(':confirm wq\n')
screen:expect([[
foo |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1: }|
"Xfoo" [noeol] 1L, 3B written |
{3:Save changes to "Untitled"?} |
@ -315,12 +261,7 @@ describe(':confirm command dialog', function()
feed('C')
screen:expect([[
^abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
"Xfoo" [noeol] 1L, 3B written |
]])
@ -343,8 +284,7 @@ describe(':confirm command dialog', function()
feed(':set ro | confirm w\n')
screen:expect([[
foobar |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:set ro | confirm w |
{3:'readonly' option is set for "Xconfirm_write_ro".} |
@ -354,11 +294,7 @@ describe(':confirm command dialog', function()
feed('N')
screen:expect([[
fooba^r |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
|
1,6 All |
]])
@ -367,8 +303,7 @@ describe(':confirm command dialog', function()
feed(':confirm w\n')
screen:expect([[
foobar |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm w |
{3:'readonly' option is set for "Xconfirm_write_ro".} |
@ -473,8 +408,7 @@ describe(':confirm command dialog', function()
b |
c |
d |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
1,1 All |
]])

View File

@ -72,12 +72,10 @@ describe('folding', function()
dd {{{ |
ee {{{ }}} |
{{{ |
ff }}} |
ff }}} |
ff }}} |*2
^ |
line 2 foldlevel=2 |
1 |
1 |
1 |*2
|
]])
@ -227,22 +225,14 @@ describe('folding', function()
screen:expect([[
{3:+ }{4: 0 }{2:^+-- 2 lines: ·························}|
{3:+ }{4: 1 }{2:+-- 2 lines: ·························}|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
feed("j")
screen:expect([[
{3:+ }{4: 1 }{2:+-- 2 lines: ·························}|
{3:+ }{4: 0 }{2:^+-- 2 lines: ·························}|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
end)
@ -259,10 +249,7 @@ describe('folding', function()
^one |
{2:+-- 2 lines: two····························}|
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
feed('2G')
@ -271,9 +258,7 @@ describe('folding', function()
^two |
three |
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
feed('4G')
@ -281,10 +266,7 @@ describe('folding', function()
one |
{2:+-- 2 lines: two····························}|
^four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
feed('3G')
@ -293,9 +275,7 @@ describe('folding', function()
two |
^three |
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
feed('1G')
@ -303,10 +283,7 @@ describe('folding', function()
^one |
{2:+-- 2 lines: two····························}|
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
feed('2G')
@ -315,9 +292,7 @@ describe('folding', function()
^two |
three |
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
feed('k')
@ -325,10 +300,7 @@ describe('folding', function()
^one |
{2:+-- 2 lines: two····························}|
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
end)

View File

@ -28,10 +28,7 @@ describe(':global', function()
feed('<C-C>')
screen:expect([[
^foo |
foo |
foo |
foo |
foo |
foo |*4
{1:Interrupted} |
]])

View File

@ -112,10 +112,7 @@ describe('Visual selection highlight', function()
feed('v$')
screen:expect([[
{0:>}{1:n, no sea takimata sanctus est Lorem ipsum dolor sit amet.}^ |
|
|
|
|
|*4
{2:-- VISUAL --} |
]])
end)

View File

@ -121,10 +121,7 @@ describe("'listchars'", function()
{4: } │{4: } │{4: } |
{4: }a │{4: }a │{4: }a |
{4: }aaaaaa │{4: }a{1:>}│{4: }aaaaaa |
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|*4
{3:[No Name] [+] <[+] }{2:[No Name] [+] }|
|
]])
@ -134,10 +131,7 @@ describe("'listchars'", function()
{4: } │{4: } │{4: } |
{4: }a │{4: }a│{4: }a |
{4: }aaaaaa │{4: }{1:>}│{4: }aaaaaa |
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|*4
{3:[No Name] [+] <+] }{2:[No Name] [+] }|
|
]])
@ -147,10 +141,7 @@ describe("'listchars'", function()
{4: } │{4: }│{4: } |
{4: }a │{4: }│{4: }a |
{4: }aaaaaa │{4: }│{4: }aaaaaa |
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|*4
{3:[No Name] [+] <] }{2:[No Name] [+] }|
|
]])
@ -160,10 +151,7 @@ describe("'listchars'", function()
{4: } │{4: }│{4: } |
{4: }a │{4: }│{4: }a |
{4: }aaaaaa │{4: }│{4: }aaaaaa |
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|*4
{3:[No Name] [+] < }{2:[No Name] [+] }|
|
]])
@ -173,10 +161,7 @@ describe("'listchars'", function()
{4: } │{4: }│{4: } |
{4: }a │{4: }│{4: }a |
{4: }aaaaaa │{4: }│{4: }aaaaaa |
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|*4
{3:[No Name] [+] < }{2:[No Name] [+] }|
|
]])
@ -187,10 +172,7 @@ describe("'listchars'", function()
{4: } │{4: } │{4: } |
{4: }a │{4: }a │{4: }a |
{4: }aaaaaa │{4: }aaaaaa │{4: }aaaaaa |
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|*4
{3:[No Name] [+] }{2:[No Name] [+] }{3:[No Name] [+] }|
:set nowrap foldcolumn=4 |
]])
@ -200,10 +182,7 @@ describe("'listchars'", function()
{4: } │{4: }│{4: } |
{4: }a │{4: }│{4: }a |
{4: }aaaaaa │{4: ^ }│{4: }aaaaaa |
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|
{1:~ }│{1:~ }│{1:~ }|*4
{3:[No Name] [+] }{2:<[+] }{3:[No Name] [+] }|
:set nowrap foldcolumn=4 |
]])
@ -213,10 +192,7 @@ describe("'listchars'", function()
{4: } │{4: }│{4: } |
{4: }a │{4: }│{4: }a |
{4: }aaaaaa │{4:^ }│{4: }aaaaaa |
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|
{1:~ }│{1:~}│{1:~ }|*4
{3:[No Name] [+] }{2:< }{3:[No Name] [+] }|
:set nowrap foldcolumn=4 |
]])

View File

@ -217,18 +217,14 @@ describe('listlbr', function()
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb {1:c}^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
2 |
]])
feed('zo')
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb ^c |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:E490: No fold found} |
]])
@ -236,18 +232,14 @@ describe('listlbr', function()
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb {1:c}^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:E490: No fold found} 2 |
]])
feed('gq')
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb ^c |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:E490: No fold found} |
]])
@ -255,18 +247,14 @@ describe('listlbr', function()
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb {1:c}^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:E490: No fold found} 1x2 |
]])
feed('I')
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb ^c |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:E490: No fold found} |
]])
@ -274,18 +262,14 @@ describe('listlbr', function()
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb {1:c}^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:E490: No fold found} 2 |
]])
feed('s')
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
bbbbbbbbbb ^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2:E490: No fold found} |
]])
end)

View File

@ -55,13 +55,7 @@ describe('match highlighting', function()
screen:expect([[
^xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{1:]} |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*7
|
]])
end)
@ -112,14 +106,7 @@ describe('match highlighting', function()
]])
screen:expect([[
{1: ^ }ix |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*8
|
]])
end)

View File

@ -47,16 +47,12 @@ describe('matchparen', function()
local screen1 = [[
{1:^()} |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]]
local screen2 = [[
^aa |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]]

View File

@ -34,18 +34,12 @@ describe('messages', function()
feed('u')
screen:expect({grid = [[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{3:W10: Warning: Changing a readonly file}^ |
]], timeout = 500})
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
Already at oldest change |
]])
end)
@ -74,12 +68,7 @@ describe('messages', function()
^one |
NoSuchFile |
three |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
from DebugSilent normal |
]])
@ -89,12 +78,7 @@ describe('messages', function()
^one |
NoSuchFile |
three |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
from DebugSilent visual |
]])
@ -105,11 +89,7 @@ describe('messages', function()
one |
NoSuchFil^e |
three |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
from DebugSilent visual |
{1:E447: Can't find file "NoSuchFile" in path} |
]])
@ -478,15 +458,8 @@ describe('messages', function()
command('mode') -- FIXME: bottom is invalid after scrolling
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
|
|
{0:~ }|*7
|*2
]])
feed([[:4 verbose echo system('foo')<CR>]])
screen:expect([[
@ -555,14 +528,7 @@ describe('messages', function()
feed('q')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*8
|
]])
end)
@ -591,18 +557,14 @@ describe('messages', function()
feed('i')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{3: }|
{2:-- INSERT --} |
]])
feed('<C-C>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{3: }|
|
]])
@ -617,18 +579,14 @@ describe('messages', function()
feed('i')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{3:[No Name] }|
{2:-- INSERT --} |
]])
feed('<Esc>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{3:[No Name] }|
|
]])
@ -639,19 +597,13 @@ describe('messages', function()
feed('i<C-O>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:-- (insert) --} |
]])
feed('<C-C>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
end)
@ -673,18 +625,14 @@ describe('messages', function()
screen:expect([[
1 |
2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:Backwards range given, OK to swap (y/n)?}^ |
]])
feed('n')
screen:expect([[
^1 |
2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:Backwards range given, OK to swap (y/n)?}n |
]])
@ -692,18 +640,14 @@ describe('messages', function()
screen:expect([[
1 |
2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:Backwards range given, OK to swap (y/n)?}^ |
]])
feed('<Esc>')
screen:expect([[
^1 |
2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:Backwards range given, OK to swap (y/n)?}n |
]])
@ -711,18 +655,14 @@ describe('messages', function()
screen:expect([[
1 |
2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:Backwards range given, OK to swap (y/n)?}^ |
]])
feed('y')
screen:expect([[
y1 |
^y2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:Backwards range given, OK to swap (y/n)?}y |
]])
end)
@ -749,19 +689,15 @@ describe('messages', function()
screen:expect([[
{2: [No Name] }{1: [No Name] }{3: }{2:X}|
^ |
{0:~ }|
{0:~ }|
|
|
{0:~ }|*2
|*2
]])
feed(':tabprev | edit Xfileinfo.txt<CR>')
screen:expect([[
{1: Xfileinfo.txt }{2: [No Name] }{3: }{2:X}|
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
"Xfileinfo.txt" [New] |
]])
assert_alive()
@ -793,10 +729,7 @@ describe('messages', function()
feed('0$')
screen:expect([[
^hi |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
'b' written |
]])
os.remove('b.txt')

View File

@ -22,11 +22,7 @@ describe(':move', function()
^First |
Third |
Fourth |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
:move +1 |
]])
@ -38,11 +34,7 @@ describe(':move', function()
Second |
Third |
Fourth |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
|
]])
end)

View File

@ -18,22 +18,13 @@ describe('normal', function()
]])
screen:expect([[
{1: 2 }222222222222222222222222222222222222|
{1: }222222222222222222222222222222222222|
{1: }222222222222222222222222222222222222|
{1: }222222222222222222222222222222222222|
{1: }222222222222222222222222222222222222|
{1: }222222222222222222222222222222222222|*4
{1: }22222222222222222222 |
{1: 3 }333333333333333333333333333333333333|
{1: }333333333333333333333333333333333333|
{1: }333333333333333333333333333333333333|
{1: }333333333333333333333333333333333333|
{1: }333333333333333333333333333333333333|
{1: }333333333333333333333333333333333333|*4
{1: }33333333333333333333 |
{1: 4 }^444444444444444444444444444444444444|
{1: }444444444444444444444444444444444444|
{1: }444444444444444444444444444444444444|
{1: }444444444444444444444444444444444444|
{1: }444444444444444444444444444444444444|
{1: }444444444444444444444444444444444444|*4
{1: }44444444444444444444 |
|
]])

View File

@ -66,17 +66,7 @@ describe('set', function()
command('verbose set scroll?')
screen:expect([[
|
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*11
|
scroll=7 |
Last set from changed window size |

View File

@ -57,14 +57,10 @@ describe('prompt buffer', function()
]])
screen:expect([[
cmd: ^ |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
other buffer |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
end
@ -84,22 +80,13 @@ describe('prompt buffer', function()
cmd: ^ |
[Prompt] |
other buffer |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
feed("exit\n")
screen:expect([[
^other buffer |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*8
|
]])
end)
@ -110,66 +97,43 @@ describe('prompt buffer', function()
feed("hello<BS><BS>")
screen:expect([[
cmd: hel^ |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
other buffer |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
feed("<Left><Left><Left><BS>-")
screen:expect([[
cmd: -^hel |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
other buffer |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
feed("<C-O>lz")
screen:expect([[
cmd: -hz^el |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
other buffer |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
feed("<End>x")
screen:expect([[
cmd: -hzelx^ |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
other buffer |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
feed("<C-U>exit\n")
screen:expect([[
^other buffer |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*8
|
]])
end)
@ -180,40 +144,28 @@ describe('prompt buffer', function()
feed("<C-O>:call SwitchWindows()<CR>")
screen:expect{grid=[[
cmd: |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
^other buffer |
~ |
~ |
~ |
~ |*3
|
]]}
feed("<C-O>:call SwitchWindows()<CR>")
screen:expect([[
cmd: ^ |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
other buffer |
~ |
~ |
~ |
~ |*3
-- INSERT -- |
]])
feed("<Esc>")
screen:expect([[
cmd:^ |
~ |
~ |
~ |
~ |*3
[Prompt] [+] |
other buffer |
~ |
~ |
~ |
~ |*3
|
]])
end)

View File

@ -64,8 +64,7 @@ describe('put', function()
three more text │ three more text |
^four more text │ four more text |
│ |
~ │~ |
~ │~ |
~ │~ |*2
[No Name] [+] [No Name] [+] |
|
]])

View File

@ -36,17 +36,14 @@ describe('smoothscroll', function()
:5
]])
local s1 = [[
word word word word word word word word |
word word word word word word word word |
word word word word word word word word |*2
word word word word |
line three |
long word long word long word long word |
long word long word long word |
^line |
line |
line |
~ |
~ |
line |*2
~ |*2
|
]]
local s2 = [[
@ -56,11 +53,8 @@ describe('smoothscroll', function()
long word long word long word long word |
long word long word long word |
^line |
line |
line |
~ |
~ |
~ |
line |*2
~ |*3
|
]]
local s3 = [[
@ -69,26 +63,17 @@ describe('smoothscroll', function()
long word long word long word long word |
long word long word long word |
^line |
line |
line |
~ |
~ |
~ |
~ |
line |*2
~ |*4
|
]]
local s4 = [[
line three |
long word long word long word long word |
long word long word long word |
line |
line |
line |*2
^line |
~ |
~ |
~ |
~ |
~ |
~ |*5
|
]]
local s5 = [[
@ -96,13 +81,9 @@ describe('smoothscroll', function()
line three |
long word long word long word long word |
long word long word long word |
line |
line |
line |*2
^line |
~ |
~ |
~ |
~ |
~ |*4
|
]]
local s6 = [[
@ -111,38 +92,30 @@ describe('smoothscroll', function()
line three |
long word long word long word long word |
long word long word long word |
line |
line |
line |*2
^line |
~ |
~ |
~ |
~ |*3
|
]]
local s7 = [[
word word word word word word word word |
word word word word word word word word |
word word word word word word word word |*2
word word word word |
line three |
long word long word long word long word |
long word long word long word |
line |
line |
line |*2
^line |
~ |
~ |
~ |*2
|
]]
local s8 = [[
line one |
word word word word word word word word |
word word word word word word word word |
word word word word word word word word |*2
word word word word |
line three |
long word long word long word long word |
long word long word long word |
line |
line |
line |*2
^line |
~ |
|
@ -187,8 +160,7 @@ describe('smoothscroll', function()
ϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛϛ^ϛϛϛϛϛ|
ϛϛϛϛϛ |
222222222222222222222222222222222222 |
~ |
~ |
~ |*2
|
]])
end)
@ -217,9 +189,7 @@ describe('smoothscroll', function()
3 ^line |
4 line |
5 line |
~ |
~ |
~ |
~ |*3
|
]])
feed('<C-E>')
@ -231,10 +201,7 @@ describe('smoothscroll', function()
3 ^line |
4 line |
5 line |
~ |
~ |
~ |
~ |
~ |*4
|
]])
feed('<C-E>')
@ -245,11 +212,7 @@ describe('smoothscroll', function()
3 ^line |
4 line |
5 line |
~ |
~ |
~ |
~ |
~ |
~ |*5
|
]])
exec('set cpo-=n')
@ -261,10 +224,7 @@ describe('smoothscroll', function()
3 ^line |
4 line |
5 line |
~ |
~ |
~ |
~ |
~ |*4
|
]])
feed('<C-Y>')
@ -277,9 +237,7 @@ describe('smoothscroll', function()
3 ^line |
4 line |
5 line |
~ |
~ |
~ |
~ |*3
|
]])
feed('<C-Y>')
@ -293,8 +251,7 @@ describe('smoothscroll', function()
3 ^line |
4 line |
5 line |
~ |
~ |
~ |*2
|
]])
exec('botright split')
@ -351,12 +308,7 @@ describe('smoothscroll', function()
y long text very long text very long|
text very long text very long text |
1 three |
~ |
~ |
~ |
~ |
~ |
~ |
~ |*6
--No lines in buffer-- |
]])
end)
@ -376,8 +328,7 @@ describe('smoothscroll', function()
very long text very long text very long |
text very long text- |
three |
~ |
~ |
~ |*2
|
]])
exec('set listchars+=precedes:#')
@ -387,8 +338,7 @@ describe('smoothscroll', function()
very long text very long text very long |
text very long text- |
three |
~ |
~ |
~ |*2
|
]])
end)
@ -408,8 +358,7 @@ describe('smoothscroll', function()
]])
screen:expect([[
- ^just some text here |
~ |
~ |
~ |*2
[No Name] [+] |
- just some text here |
~ |
@ -580,10 +529,7 @@ describe('smoothscroll', function()
feed('zt')
screen:expect([[
^four |
~ |
~ |
~ |
~ |
~ |*4
|
]])
feed('zz')
@ -591,8 +537,7 @@ describe('smoothscroll', function()
<<<of text with lots of text with lots o|
f text with lots of text end |
^four |
~ |
~ |
~ |*2
|
]])
feed('zb')
@ -650,8 +595,7 @@ describe('smoothscroll', function()
<<<ts of text with lots of text with lot|
^s of text with lots of text with lots of|
text |
~ |
~ |
~ |*2
|
]])
feed('0')
@ -696,18 +640,13 @@ describe('smoothscroll', function()
screen:expect([[
^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
口口口口口口口口口口 |
~ |
~ |
~ |
~ |*3
|
]])
feed('<C-E>')
screen:expect([[
<<< 口口口口口口口^口 |
~ |
~ |
~ |
~ |
~ |*4
|
]])
end)
@ -795,14 +734,7 @@ describe('smoothscroll', function()
]])
-- does not scroll halfway when scrolling to end of buffer
screen:expect([[
|
|
|
|
|
|
|
|
|*8
^ |
|
]])
@ -811,13 +743,7 @@ describe('smoothscroll', function()
-- cursor is not placed below window
screen:expect([[
<<<aaaaaaaaaaaaaaaaa |
|
|
|
|
|
|
|
|*7
^ |
|
]])
@ -907,8 +833,7 @@ describe('smoothscroll', function()
aaaaaaaaaa |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaa |
|
|
|*2
bbb |
|
]])
@ -917,25 +842,19 @@ describe('smoothscroll', function()
{0:<<<}{1:aaaaaa^a }|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaa |
|
|
|*2
bbb |
ccc |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]])
feed('2<C-E>')
screen:expect([[
{0:<<<}{1:aaaaaa^a }|
|
|
|*2
bbb |
ccc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]])
end)
@ -962,21 +881,7 @@ describe('smoothscroll', function()
]])
screen:expect([[
{1: }│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |
{2:@}│ |*15
{2:^@}│ |
{3:< }{4:[No Name] [+] }|
|
@ -1001,8 +906,7 @@ describe('smoothscroll', function()
line3line3line3line3line3line3line3line3|
line3line3line3line3 |
line4 |
~ |
~ |
~ |*2
[No Name] [+] |
|
]])
@ -1105,11 +1009,7 @@ describe('smoothscroll', function()
feed('Go123456789<CR>')
screen:expect([[
<<<ery long line ...A very long line ...|
A very long line ...A very long line ...|
A very long line ...A very long line ...|
A very long line ...A very long line ...|
A very long line ...A very long line ...|
A very long line ...A very long line ...|
A very long line ...A very long line ...|*5
123456789 |
^ |
-- INSERT -- |

View File

@ -688,27 +688,18 @@ describe('search cmdline', function()
local s = [[
{tilde:<<<} 18 19 20 21 22 2|
^3 24 |
|
|
|
|
|*4
]]
screen:expect(s)
feed('/xx')
screen:expect([[
|
|
|
|
|*4
{inc:xx}x |
/xx^ |
]])
feed('x')
screen:expect([[
|
|
|
|
|*4
{inc:xxx} |
/xxx^ |
]])
@ -737,11 +728,9 @@ describe('Search highlight', function()
]])
feed([[/\_.*<CR>]])
screen:expect([[
{2:xxx } |
{2:xxx } |
{2:xxx } |*2
{2:^xxx }{3: }|
{1:~ }|
{1:~ }|
{1:~ }|*2
/\_.* |
]])
end)
@ -769,8 +758,7 @@ describe('Search highlight', function()
xxx {4:y}{5:yy}{3: zzz} |
{3:xxx }{5:yyy}{3: zzz} |
{3:xxx }{5:y}{4:^yy} zzz |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:-- VISUAL --} |
]])
end)

View File

@ -35,8 +35,7 @@ describe('search stat', function()
{2:^find this} |
fooooobar |
foba |
foobar |
foobar |
foobar |*2
foo |
fooooobar |
foba |
@ -49,8 +48,7 @@ describe('search stat', function()
{2:^find this} |
fooooobar |
foba |
foobar |
foobar |
foobar |*2
foo |
fooooobar |
foba |
@ -73,11 +71,7 @@ describe('search stat', function()
{3:^+-- 2 lines: foo·············}|
endif |
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
/foo [1/2] |
]])
-- Note: there is an intermediate state where the search stat disappears.
@ -99,12 +93,7 @@ describe('search stat', function()
int cat; |
int {2:^dog}; |
cat = {2:dog}; |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
/dog [1/2] |
]])
feed('G0gD')
@ -112,12 +101,7 @@ describe('search stat', function()
int {2:^cat}; |
int dog; |
{2:cat} = dog; |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]])
end)
@ -148,11 +132,7 @@ describe('search stat', function()
{2:abc}--c |
--------{4:abc} |
--{2:abc} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
/abc^ |
]])
@ -162,11 +142,7 @@ describe('search stat', function()
{2:abc}--c |
--------{2:abc} |
--{4:abc} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
/abc^ |
]])
@ -176,11 +152,7 @@ describe('search stat', function()
{4:abc}--c |
--------{2:abc} |
--{2:abc} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
/abc^ |
]])
end)
@ -197,13 +169,7 @@ describe('search stat', function()
screen:expect([[
{2:^test} |
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*7
/\<test\> [1/1] |
]])
@ -211,13 +177,7 @@ describe('search stat', function()
screen:expect([[
{2:^test} |
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*7
?\<test\> [1/1] |
]])
@ -227,13 +187,7 @@ describe('search stat', function()
screen:expect([[
{2:^test} |
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*7
{5:search hit TOP, continuing at BOTTOM} |
]])
end)

View File

@ -21,10 +21,7 @@ describe(':source!', function()
feed(':source! Xscript.vim\n')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{1:E22: Scripts nested too deep} |
]])
os.remove('Xscript.vim')

View File

@ -60,10 +60,7 @@ describe('statusline', function()
]])
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{3:<F}{2:GHI }|
|
]])
@ -97,9 +94,7 @@ describe('statusline', function()
screen:expect([[
{5:+-- 2 lines: a···································}|
^c |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{3:g }|
|
]])
@ -110,8 +105,7 @@ describe('statusline', function()
^a |
b |
c |
{0:~ }|
{0:~ }|
{0:~ }|*2
{3: }|
|
]])
@ -121,8 +115,7 @@ describe('statusline', function()
{1:a} |
{1:b} |
{1:c}^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:3x2 }|
{2:-- VISUAL BLOCK --} |
]])
@ -132,8 +125,7 @@ describe('statusline', function()
a |
b |
^c |
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:1234 }|
|
]])
@ -145,8 +137,7 @@ describe('statusline', function()
a |
b |
^c |
{0:~ }|
{0:~ }|
{0:~ }|*2
{3:[No Name] [+] 1234 }|
: |
]])

View File

@ -179,10 +179,7 @@ describe(':substitute', function()
{1:o}ne |
two |
three |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:replace with (y/n/a/q/l/^E/^Y)?}^ |
]])
end)

View File

@ -44,9 +44,7 @@ describe('tabline', function()
{3:g }|
{5:+-- 2 lines: a···································}|
^c |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]])
@ -57,8 +55,7 @@ describe('tabline', function()
^a |
b |
c |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]])
@ -68,8 +65,7 @@ describe('tabline', function()
{1:a} |
{1:b} |
{1:c}^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
{2:-- VISUAL BLOCK --} |
]])
@ -79,8 +75,7 @@ describe('tabline', function()
a |
b |
^c |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]])
@ -92,8 +87,7 @@ describe('tabline', function()
a |
b |
^c |
{0:~ }|
{0:~ }|
{0:~ }|*2
: |
]])
end)

View File

@ -33,8 +33,7 @@ describe('Visual highlight', function()
{2:aaaaaa}^ |
{2:bbbb } |
{2:cc } |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1:-- VISUAL BLOCK --} |
]])
@ -43,8 +42,7 @@ describe('Visual highlight', function()
{2:aaaaaa } |
{2:bbbb } |
{2:cc}^ {2: } |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1:-- VISUAL BLOCK --} |
]])
end)
@ -60,9 +58,7 @@ describe('Visual highlight', function()
screen:expect([[
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^a|
{0:+}{2:aaaa}aaaaaa |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:-- VISUAL --} |
]])
end)

View File

@ -296,10 +296,7 @@ describe('splitkeep', function()
a |
b |
c |
~ |
~ |
~ |
~ |
~ |*4
[No Name] |
^a |
b |
@ -328,8 +325,7 @@ describe('splitkeep', function()
<<<e line with lots of text in one line |
^with lots of text in one line with lots |
of text in one line |
~ |
~ |
~ |*2
[No Name] [+] |
|
]])

View File

@ -117,14 +117,7 @@ describe(':lua command', function()
feed('<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
|
]]}
eq('E5108: Error executing lua [string ":lua"]:1: fail\nmuch error\nsuch details', remove_trace(eval('v:errmsg')))

View File

@ -112,14 +112,7 @@ describe('vim.uv', function()
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
howdy |
]])
eq(true, eval("get(g:, 'valid', v:false)"))
@ -137,14 +130,7 @@ describe('vim.uv', function()
]])
screen:expect([[
sneaky^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
{5:-- INSERT --} |
]])
eq({blocking=false, mode='n'}, exec_lua("return _G.mode"))

View File

@ -521,9 +521,7 @@ describe('v:lua', function()
{1:~ }{2: stuff }{1: }|
{1:~ }{3: steam }{1: }|
{1:~ }{3: strange things }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{4:-- Omni completion (^O^N^P) }{5:match 1 of 3} |
]]}
meths.set_option_value('operatorfunc', 'v:lua.mymod.noisy', {})

View File

@ -148,9 +148,7 @@ describe('print', function()
feed([[:lua print('\na')<CR>]])
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{2: }|
|
a |
@ -160,8 +158,7 @@ describe('print', function()
feed([[:lua print('b\n\nc')<CR>]])
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{2: }|
b |
|
@ -196,16 +193,7 @@ describe('debug.debug', function()
feed(':lua Test()\n')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*10
{1: }|
nil |
lua_debug> ^ |
@ -213,14 +201,7 @@ describe('debug.debug', function()
feed('print("TEST")\n')
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*8
{1: }|
nil |
lua_debug> print("TEST") |
@ -230,8 +211,7 @@ describe('debug.debug', function()
feed('<C-c>')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
nil |
lua_debug> print("TEST") |
@ -247,16 +227,7 @@ describe('debug.debug', function()
feed('<C-l>:lua Test()\n')
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*10
{1: }|
nil |
lua_debug> ^ |
@ -264,10 +235,7 @@ describe('debug.debug', function()
feed('\n')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{1: }|
nil |
lua_debug> |
@ -285,32 +253,14 @@ describe('debug.debug', function()
feed(':lua debug.debug() print("x")<cr>')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*12
lua_debug> ^ |
]]}
feed("conttt<cr>") -- misspelled cont; invalid syntax
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*8
{1: }|
lua_debug> conttt |
{E:E5115: Error while loading debug string: (debug comma}|
@ -321,12 +271,7 @@ describe('debug.debug', function()
feed("cont<cr>") -- exactly "cont", exit now
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
{1: }|
lua_debug> conttt |
{E:E5115: Error while loading debug string: (debug comma}|
@ -339,18 +284,7 @@ describe('debug.debug', function()
feed('<cr>')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*12
|
]]}
end)

View File

@ -48,9 +48,7 @@ describe('vim.secure', function()
feed_command([[lua vim.secure.read('Xfile')]])
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2: }|
:lua vim.secure.read('Xfile') |
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
@ -59,12 +57,7 @@ describe('vim.secure', function()
feed('d')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]}
@ -77,9 +70,7 @@ describe('vim.secure', function()
feed_command([[lua vim.secure.read('Xfile')]])
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2: }|
:lua vim.secure.read('Xfile') |
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
@ -88,12 +79,7 @@ describe('vim.secure', function()
feed('a')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]}
@ -107,9 +93,7 @@ describe('vim.secure', function()
feed_command([[lua vim.secure.read('Xfile')]])
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2: }|
:lua vim.secure.read('Xfile') |
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
@ -118,12 +102,7 @@ describe('vim.secure', function()
feed('i')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]}
@ -134,9 +113,7 @@ describe('vim.secure', function()
feed_command([[lua vim.secure.read('Xfile')]])
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2: }|
:lua vim.secure.read('Xfile') |
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
@ -145,8 +122,7 @@ describe('vim.secure', function()
feed('v')
screen:expect{grid=[[
^let g:foobar = 42 |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:]] .. funcs.fnamemodify(cwd, ':~') .. pathsep .. [[Xfile [RO]{MATCH:%s+}}|
|
{1:~ }|

View File

@ -35,11 +35,7 @@ describe('thread', function()
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{2: }|
{3:Error in luv thread:} |
{3:[string "<nvim>"]:2: Error in thread entry func} |
@ -66,11 +62,7 @@ describe('thread', function()
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{2: }|
{3:Error in luv callback, thread:} |
{3:[string "<nvim>"]:6: Error in thread callback} |
@ -91,14 +83,7 @@ describe('thread', function()
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
print in thread |
]])
end)
@ -113,14 +98,7 @@ describe('thread', function()
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
{ 1, 2 } |
]])
end)
@ -294,11 +272,7 @@ describe('threadpool', function()
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{2: }|
{3:Error in luv thread:} |
{3:Error: thread arg not support type 'table' at 1} |

View File

@ -46,18 +46,14 @@ describe('vim.ui_attach', function()
feed('ifo')
screen:expect{grid=[[
fo^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:-- INSERT --} |
]]}
funcs.complete(1, {'food', 'foobar', 'foo'})
screen:expect{grid=[[
food^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:-- INSERT --} |
]]}
expect_events {
@ -67,9 +63,7 @@ describe('vim.ui_attach', function()
feed '<c-n>'
screen:expect{grid=[[
foobar^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:-- INSERT --} |
]]}
expect_events {

View File

@ -271,9 +271,7 @@ describe('lua stdlib', function()
screen:attach()
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
@ -2798,25 +2796,19 @@ describe('lua stdlib', function()
screen:attach()
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]]}
exec_lua [[vim.notify_once("I'll only tell you this once...", vim.log.levels.WARN)]]
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:I'll only tell you this once...} |
]]}
feed('<C-l>')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]]}
exec_lua [[vim.notify_once("I'll only tell you this once...")]]

View File

@ -27,36 +27,27 @@ describe("'fillchars'", function()
eq('', eval('&fillchars'))
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
|
]])
end)
it('supports whitespace', function()
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
|
]])
command('set fillchars=eob:\\ ')
screen:expect([[
^ |
|
|
|
|
|*4
]])
end)
it('supports multibyte char', function()
command('set fillchars=eob:ñ')
screen:expect([[
^ |
ñ |
ñ |
ñ |
ñ |*3
|
]])
end)
@ -77,9 +68,7 @@ describe("'fillchars'", function()
command('set fillchars=fold:x')
screen:expect([[
^+-- 2 lines: fooxxxxxxxx│+-- 2 lines: fooxxxxxxx|
~ │~ |
~ │~ |
~ │~ |
~ │~ |*3
|
]])
end)
@ -92,9 +81,7 @@ describe("'fillchars'", function()
command('setl fillchars=fold:x')
screen:expect([[
^+-- 2 lines: fooxxxxxxxx│+-- 2 lines: foo·······|
~ │~ |
~ │~ |
~ │~ |
~ │~ |*3
|
]])
end)
@ -108,9 +95,7 @@ describe("'fillchars'", function()
command('set fillchars&')
screen:expect([[
^+-- 2 lines: foo········│+-- 2 lines: fooxxxxxxx|
~ │~ |
~ │~ |
~ │~ |
~ │~ |*3
|
]])
end)
@ -132,9 +117,7 @@ describe("'listchars'", function()
command('set listchars=tab:<->')
screen:expect([[
<------><------>^<------> │<------><------><------>|
~ │~ |
~ │~ |
~ │~ |
~ │~ |*3
|
]])
end)
@ -146,9 +129,7 @@ describe("'listchars'", function()
command('setl listchars<')
screen:expect([[
> > ^> │<------><------><------>|
~ │~ |
~ │~ |
~ │~ |
~ │~ |*3
|
]])
end)
@ -160,9 +141,7 @@ describe("'listchars'", function()
command('set listchars=tab:>-,eol:$')
screen:expect([[
>------->-------^>-------$│<------><------><------>|
~ │~ |
~ │~ |
~ │~ |
~ │~ |*3
|
]])
end)

View File

@ -32,10 +32,7 @@ describe("'cursorbind'", function()
feed('20l')
screen:expect([[
a bb cc dd ee ff gg │aa bb cc dd ee ff gg^ hh ii jj kk ll mm |
{4: }│ {4: } |
{4: }│ {4: } |
{4: }│ {4: } |
{4: }│ {4: } |
{4: }│ {4: } |*4
{1:~ }│{1:~ }|
{3:[No Name] [+] }{2:[No Name] [+] }|
|
@ -43,10 +40,7 @@ describe("'cursorbind'", function()
feed('10l')
screen:expect([[
hh ii jj kk ll mm n│aa bb cc dd ee ff gg hh ii jj ^kk ll mm |
{4: } │ {4: } |
{4: } │ {4: } |
{4: } │ {4: } |
{4: } │ {4: } |
{4: } │ {4: } |*4
{1:~ }│{1:~ }|
{3:[No Name] [+] }{2:[No Name] [+] }|
|
@ -56,10 +50,7 @@ describe("'cursorbind'", function()
feed('20l')
screen:expect([[
{4:a bb cc dd ee ff gg }│{4:aa bb cc dd ee ff gg^ hh ii jj kk ll mm }|
{4: }│ {4: } |
{4: }│ {4: } |
{4: }│ {4: } |
{4: }│ {4: } |
{4: }│ {4: } |*4
{1:~ }│{1:~ }|
{3:[No Name] [+] }{2:[No Name] [+] }|
|
@ -67,10 +58,7 @@ describe("'cursorbind'", function()
feed('10l')
screen:expect([[
{4: hh ii jj kk ll mm n}│{4:aa bb cc dd ee ff gg hh ii jj ^kk ll mm }|
{4: } │ {4: } |
{4: } │ {4: } |
{4: } │ {4: } |
{4: } │ {4: } |
{4: } │ {4: } |*4
{1:~ }│{1:~ }|
{3:[No Name] [+] }{2:[No Name] [+] }|
|
@ -80,10 +68,7 @@ describe("'cursorbind'", function()
feed('40l')
screen:expect([[
kk ll mm nn oo pp qq│ bb cc dd ee ff gg hh ii jj kk ll mm n^n|
│ |
│ |
│ |
│ |
│ |*4
{1:~ }│{1:~ }|
{3:[No Name] [+] }{2:[No Name] [+] }|
|

View File

@ -32,8 +32,7 @@ describe('startup defaults', function()
command('filetype')
screen:expect([[
^ |
~ |
~ |
~ |*2
]]..expected
)
end

View File

@ -22,9 +22,7 @@ describe("'shortmess'", function()
feed(':edit foo<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
"foo" [New] |
]])
eq(1, eval('bufnr("%")'))
@ -33,9 +31,7 @@ describe("'shortmess'", function()
feed(':edit bar<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
:edit bar |
]])
eq(2, eval('bufnr("%")'))
@ -47,27 +43,21 @@ describe("'shortmess'", function()
feed(':edit foo<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
"foo" [New] |
]])
eq(1, eval('bufnr("%")'))
feed(':edit bar<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
"bar" [New] |
]])
eq(2, eval('bufnr("%")'))
feed(':bprevious<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
"foo" [New] --No lines in buffer-- |
]])
eq(1, eval('bufnr("%")'))
@ -76,18 +66,14 @@ describe("'shortmess'", function()
feed(':bnext<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
:bnext |
]])
eq(2, eval('bufnr("%")'))
feed(':bprevious<CR>')
screen:expect([[
^ |
~ |
~ |
~ |
~ |*3
:bprevious |
]])
eq(1, eval('bufnr("%")'))

View File

@ -125,9 +125,7 @@ describe('semantic token highlighting', function()
{6:#endif} |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
end)
@ -164,9 +162,7 @@ describe('semantic token highlighting', function()
{6:#endif} |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
@ -199,9 +195,7 @@ describe('semantic token highlighting', function()
#endif |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
end)
@ -234,9 +228,7 @@ describe('semantic token highlighting', function()
#endif |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
@ -257,9 +249,7 @@ describe('semantic token highlighting', function()
{6:#endif} |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
end)
@ -286,9 +276,7 @@ describe('semantic token highlighting', function()
{6:#endif} |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
@ -309,9 +297,7 @@ describe('semantic token highlighting', function()
{6:#endif} |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], unchanged = true }
@ -365,9 +351,7 @@ describe('semantic token highlighting', function()
{6:#endif} |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
feed_command('%s/int x/int x()/')
@ -383,11 +367,8 @@ describe('semantic token highlighting', function()
{6:#else} |
{6: printf("%d\n", x);} |
{6:#endif} |
} |
} |
{1:~ }|
{1:~ }|
{1:~ }|
} |*2
{1:~ }|*3
:noh |
]] }
end)
@ -447,9 +428,7 @@ describe('semantic token highlighting', function()
#endif |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
@ -474,9 +453,7 @@ describe('semantic token highlighting', function()
#endif |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], unchanged = true }
end)
@ -520,9 +497,7 @@ describe('semantic token highlighting', function()
#endif |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
end)
@ -565,9 +540,7 @@ describe('semantic token highlighting', function()
{6:#endif} |
} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]] }
feed_command('%s/int x/int x()/')
@ -587,11 +560,8 @@ describe('semantic token highlighting', function()
{6:#else} |
{6: printf("%d\n", x);} |
{6:#endif} |
} |
} |
{1:~ }|
{1:~ }|
{1:~ }|
} |*2
{1:~ }|*3
:noh |
]] }
local messages = exec_lua('return server2.messages')
@ -633,20 +603,7 @@ describe('semantic token highlighting', function()
expected_screen = function()
screen:expect{grid=[[
char* {7:foo} = "\n"^; |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*14
|
]]}
end,
@ -774,11 +731,7 @@ int main()
{6: comment} |
{6: #endif} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]]}
end,
@ -828,18 +781,7 @@ b = "as"]],
{6:-- comment} |
local {7:a} = 1 |
{2:b} = "as^" |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*12
|
]]}
end,
@ -960,16 +902,7 @@ b = "as"]],
//{6:/ what?} |
} |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*10
|
]]}
end,
@ -1055,20 +988,7 @@ b = "as"]],
expected_screen1 = function()
screen:expect{grid=[[
char* {7:foo} = "\n"^; |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*14
|
]]}
end,
@ -1076,19 +996,7 @@ b = "as"]],
screen:expect{grid=[[
^ |
char* {7:foo} = "\n"; |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*13
|
]]}
end,
@ -1304,10 +1212,7 @@ int main()
{6: printf("%d\n", x);} |
{6:#endif} |
^} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]]}
end,
@ -1325,9 +1230,7 @@ int main()
{6: printf("%d\n", x);} |
{6:^#endif} |
} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
end,
@ -1363,40 +1266,14 @@ int main()
expected_screen1 = function()
screen:expect{grid=[[
{7:string} = "test^" |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*14
|
]]}
end,
expected_screen2 = function()
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*14
|
]]}
end,

View File

@ -71,8 +71,7 @@ describe(':Man', function()
screen:expect{grid=[[
this i{c:^H}is{c:^H}s a{c:^H}a test |
with _{c:^H}o_{c:^H}v_{c:^H}e_{c:^H}r_{c:^H}s_{c:^H}t_{c:^H}r_{c:^H}u_{c:^H}c_{c:^H}k tex^t |
{eob:~ }|
{eob:~ }|
{eob:~ }|*2
|
]]}
@ -81,8 +80,7 @@ describe(':Man', function()
screen:expect([[
^this {b:is} {b:a} test |
with {i:overstruck} text |
{eob:~ }|
{eob:~ }|
{eob:~ }|*2
|
]])
end)
@ -95,8 +93,7 @@ describe(':Man', function()
screen:expect{grid=[=[
this {c:^[}[1mis {c:^[}[3ma {c:^[}[4mtest{c:^[}[0m |
{c:^[}[4mwith{c:^[}[24m {c:^[}[4mescaped{c:^[}[24m {c:^[}[4mtext{c:^[}[24^m |
{eob:~ }|
{eob:~ }|
{eob:~ }|*2
|
]=]}
@ -105,8 +102,7 @@ describe(':Man', function()
screen:expect([[
^this {b:is }{bi:a }{biu:test} |
{u:with} {u:escaped} {u:text} |
{eob:~ }|
{eob:~ }|
{eob:~ }|*2
|
]])
end)
@ -120,8 +116,7 @@ describe(':Man', function()
screen:expect([[
^this {b:is} {b:あ} test |
with {i:överstrũck} te{i:xt¶} |
{eob:~ }|
{eob:~ }|
{eob:~ }|*2
|
]])
end)

View File

@ -112,15 +112,13 @@ describe('clipboard', function()
feed('"+yl')
screen:expect([[
^a |
{0:~ }|
{0:~ }|
{0:~ }|*2
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
]])
feed('"+p')
screen:expect([[
a^a |
{0:~ }|
{0:~ }|
{0:~ }|*2
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
]])
end)
@ -132,22 +130,19 @@ describe('clipboard', function()
feed('yl')
screen:expect([[
^a |
{0:~ }|
{0:~ }|
{0:~ }|*2
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
]])
feed(':<CR>')
screen:expect([[
^a |
{0:~ }|
{0:~ }|
{0:~ }|*2
: |
]])
feed('p')
screen:expect([[
a^a |
{0:~ }|
{0:~ }|
{0:~ }|*2
: |
]])
end)
@ -157,8 +152,7 @@ describe('clipboard', function()
feed_command('redir @+> | :silent echo system("cat CONTRIBUTING.md") | redir END')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
]])
end)
@ -184,8 +178,7 @@ describe('clipboard', function()
feed_command('let @+="foo"')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
]])
end)
@ -336,8 +329,7 @@ describe('clipboard (with fake clipboard.vim)', function()
feed_command('redir @+> | bogus_cmd | redir END')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1:E492: Not an editor command: bogus_cmd | redir END} |
]])
end)
@ -663,8 +655,7 @@ describe('clipboard (with fake clipboard.vim)', function()
feed_command("registers")
screen:expect([[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{4: }|
:registers |
{1:Type Name Content} |
@ -728,8 +719,7 @@ describe('clipboard (with fake clipboard.vim)', function()
screen:expect([[
the ^source |
a target |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]])

View File

@ -27,11 +27,7 @@ describe(':terminal altscreen', function()
]])
enter_altscreen()
screen:expect([[
|
|
|
|
|
|*5
{1: } |
{3:-- TERMINAL --} |
]])
@ -45,9 +41,7 @@ describe(':terminal altscreen', function()
line1 |
line2 |
line3 |
|
|
|
|*3
]])
end)
@ -114,8 +108,7 @@ describe(':terminal altscreen', function()
local function wait_removal()
screen:try_resize(screen._width, screen._height - 2)
screen:expect([[
|
|
|*2
rows: 4, cols: 50 |
{1: } |
{3:-- TERMINAL --} |
@ -127,8 +120,7 @@ describe(':terminal altscreen', function()
feed('<c-\\><c-n>4k')
screen:expect([[
^ |
|
|
|*2
rows: 4, cols: 50 |
|
]])

View File

@ -25,10 +25,7 @@ describe('api', function()
it("qa! RPC request during insert-mode", function()
screen:expect{grid=[[
{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*4
|
{3:-- TERMINAL --} |
]]}
@ -39,10 +36,7 @@ describe('api', function()
-- Wait for socket creation.
screen:expect([[
{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*4
]]..socket_name..[[ |
{3:-- TERMINAL --} |
]])
@ -54,10 +48,7 @@ describe('api', function()
-- Wait for stdin to be processed.
screen:expect([[
[tui] insert-mode{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*4
{3:-- INSERT --} |
{3:-- TERMINAL --} |
]])

View File

@ -60,11 +60,7 @@ describe(':terminal buffer', function()
feed('<c-\\><c-n>:set bufhidden=wipe<cr>:enew<cr>')
screen:expect([[
^ |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*5
:enew |
]])
end)
@ -73,11 +69,7 @@ describe(':terminal buffer', function()
feed(':bnext:l<esc>')
screen:expect([[
^ |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*5
|
]])
end)
@ -89,11 +81,7 @@ describe(':terminal buffer', function()
screen:expect([[
tty ready |
{2:^ } |
|
|
|
|
|
|*5
]])
end)
@ -113,10 +101,7 @@ describe(':terminal buffer', function()
screen:expect([[
tty ready |
{2:^ } |
|
|
|
|
|*4
{8:E21: Cannot make changes, 'modifiable' is off} |
]])
end)
@ -127,22 +112,16 @@ describe(':terminal buffer', function()
feed('"ap"ap')
screen:expect([[
^tty ready |
appended tty ready |
appended tty ready |
appended tty ready |*2
{2: } |
|
|
|*2
:let @a = "appended " . @a |
]])
-- operator count is also taken into consideration
feed('3"ap')
screen:expect([[
^tty ready |
appended tty ready |
appended tty ready |
appended tty ready |
appended tty ready |
appended tty ready |
appended tty ready |*5
:let @a = "appended " . @a |
]])
end)
@ -155,17 +134,14 @@ describe(':terminal buffer', function()
^tty ready |
appended tty ready |
{2: } |
|
|
|
|*3
:put a |
]])
-- line argument is only used to move the cursor
feed_command('6put a')
screen:expect([[
tty ready |
appended tty ready |
appended tty ready |
appended tty ready |*2
{2: } |
|
^ |
@ -177,21 +153,13 @@ describe(':terminal buffer', function()
feed('<c-\\><c-n>:bd!<cr>')
screen:expect([[
^ |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*5
:bd! |
]])
feed_command('bnext')
screen:expect([[
^ |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*5
:bnext |
]])
end)
@ -268,10 +236,7 @@ describe(':terminal buffer', function()
screen:expect([[
ydaer ytt|
{1:a}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|
|
|
|
|*4
{3:-- TERMINAL --} |
]])
command('bdelete!')
@ -309,10 +274,7 @@ describe(':terminal buffer', function()
screen:expect{grid=[[
tty ready |
{2:^ } |
|
|
|
|
|*4
{3:-- (terminal) --} |
]]}
eq('ntT', funcs.mode(1))
@ -321,10 +283,7 @@ describe(':terminal buffer', function()
screen:expect{grid=[[
tty ready |
{2: } |
|
|
|
|
|*4
:let g:x = 17^ |
]]}
@ -332,10 +291,7 @@ describe(':terminal buffer', function()
screen:expect{grid=[[
tty ready |
{1: } |
|
|
|
|
|*4
{3:-- TERMINAL --} |
]]}
eq('t', funcs.mode(1))
@ -456,9 +412,7 @@ describe('terminal input', function()
})
screen:expect{grid=[[
{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{4:~ }|*3
{5:[No Name] 0,1 All}|
{3:-- INSERT --} |
{3:-- TERMINAL --} |
@ -580,8 +534,7 @@ describe('termopen()', function()
screen:expect(([[
^%s{MATCH:%%s+}|
[Process exited 0] |
|
|
|*2
]]):format(expected))
end

View File

@ -140,8 +140,7 @@ describe('no crash when TermOpen autocommand', function()
async_meths.command('terminal foobar')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
^ |
]]}
feed('<CR>')
@ -154,8 +153,7 @@ describe('no crash when TermOpen autocommand', function()
feed('i<CR>')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]]}
assert_alive()
@ -166,15 +164,13 @@ describe('no crash when TermOpen autocommand', function()
async_meths.command('terminal foobar')
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
^ |
]]}
feed('<CR>')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]]}
assert_alive()
@ -185,15 +181,13 @@ describe('no crash when TermOpen autocommand', function()
async_meths.open_term(0, {})
screen:expect{grid=[[
|
{0:~ }|
{0:~ }|
{0:~ }|*2
^ |
]]}
feed('<CR>')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
]]}
assert_alive()

View File

@ -25,10 +25,7 @@ describe(':terminal cursor', function()
screen:expect([[
tty ready |
testing cursor{1: } |
|
|
|
|
|*4
{3:-- TERMINAL --} |
]])
end)
@ -38,11 +35,7 @@ describe(':terminal cursor', function()
screen:expect([[
tty ready |
{2:^ } |
|
|
|
|
|
|*5
]])
end)
@ -93,21 +86,14 @@ describe(':terminal cursor', function()
hide_cursor()
screen:expect([[
tty ready |
|
|
|
|
|
|*5
{3:-- TERMINAL --} |
]])
show_cursor()
screen:expect([[
tty ready |
{1: } |
|
|
|
|
|*4
{3:-- TERMINAL --} |
]])
-- same for when the terminal is unfocused
@ -116,21 +102,13 @@ describe(':terminal cursor', function()
screen:expect([[
tty ready |
^ |
|
|
|
|
|
|*5
]])
show_cursor()
screen:expect([[
tty ready |
{2:^ } |
|
|
|
|
|
|*5
]])
end)
end)
@ -160,21 +138,14 @@ describe('cursor with customized highlighting', function()
screen:expect([[
tty ready |
{1: } |
|
|
|
|
|*4
{3:-- TERMINAL --} |
]])
feed('<c-\\><c-n>')
screen:expect([[
tty ready |
{2:^ } |
|
|
|
|
|
|*5
]])
end)
end)
@ -205,10 +176,7 @@ describe('buffer cursor position is correct in terminal without number column',
screen._handle_busy_start = function() end
screen._handle_busy_stop = function() end
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::}{17:^ }{16: }|
{3:-- TERMINAL --} |
@ -225,10 +193,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('at the end', function()
feed('<C-R>r')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaaa}{17:^ }{16: }|
{3:-- TERMINAL --} |
@ -236,10 +201,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 9}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaa^a}{1: }{16: }|
|
@ -250,10 +212,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the end', function()
feed('<C-R>r<C-X><C-X>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaa}{17:^a}{16:a }|
{3:-- TERMINAL --} |
@ -261,10 +220,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 7}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaa^a}{1:a}{16:a }|
|
@ -275,10 +231,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the start', function()
feed('<C-R>r<C-B><C-O>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::a}{17:^a}{16:aaaaaa }|
{3:-- TERMINAL --} |
@ -286,10 +239,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 2}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^a}{1:a}{16:aaaaaa }|
|
@ -306,10 +256,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('at the end', function()
feed('<C-R>r')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµµµµ}{17:^ }{16: }|
{3:-- TERMINAL --} |
@ -317,10 +264,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 17}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµµµ^µ}{1: }{16: }|
|
@ -331,10 +275,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the end', function()
feed('<C-R>r<C-X><C-X>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµµ}{17:^µ}{16:µ }|
{3:-- TERMINAL --} |
@ -342,10 +283,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 13}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµ^µ}{1:µ}{16:µ }|
|
@ -356,10 +294,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the start', function()
feed('<C-R>r<C-B><C-O>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ}{17:^µ}{16:µµµµµµ }|
{3:-- TERMINAL --} |
@ -367,10 +302,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 3}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^µ}{1:µ}{16:µµµµµµ }|
|
@ -389,10 +321,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('at the end', function()
feed('<C-R>r')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳}{17:^ }{16: }|
{3:-- TERMINAL --} |
@ -400,10 +329,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 33}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳}{1: }{16: }|
|
@ -414,10 +340,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the end', function()
feed('<C-R>r<C-X><C-X>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳µ̳}{17:^µ̳}{16:µ̳ }|
{3:-- TERMINAL --} |
@ -425,10 +348,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 25}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳^µ̳}{1:µ̳}{16:µ̳ }|
|
@ -439,10 +359,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the start', function()
feed('<C-R>r<C-B><C-O>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳}{17:^µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
{3:-- TERMINAL --} |
@ -450,10 +367,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 5}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^µ̳}{1:µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
|
@ -472,10 +386,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('at the end', function()
feed('<C-R>r')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦哦哦哦}{17:^ }{16: }|
{3:-- TERMINAL --} |
@ -483,10 +394,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 25}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦哦哦^哦}{1: }{16: }|
|
@ -497,10 +405,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the end', function()
feed('<C-R>r<C-X><C-X>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦哦}{17:^哦}{16:哦 }|
{3:-- TERMINAL --} |
@ -508,10 +413,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 19}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦^哦}{1:哦}{16:哦 }|
|
@ -522,10 +424,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the start', function()
feed('<C-R>r<C-B><C-O>')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦}{17:^哦}{16:哦哦哦哦哦哦 }|
{3:-- TERMINAL --} |
@ -533,10 +432,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 4}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^哦}{1:哦}{16:哦哦哦哦哦哦 }|
|
@ -549,10 +445,7 @@ describe('buffer cursor position is correct in terminal without number column',
setup_ex_register('aaaaaaaa ')
feed('<C-R>r')
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaaa }{17:^ }{16: }|
{3:-- TERMINAL --} |
@ -561,10 +454,7 @@ describe('buffer cursor position is correct in terminal without number column',
eq({6, 13}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]])
screen:expect([[
{16: }|
{16: }|
{16: }|
{16: }|
{16: }|*4
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaaa ^ }{1: }{16: }|
|

View File

@ -177,8 +177,7 @@ local function test_terminal_with_fake_shell(backslash)
feed_command('terminal')
screen:expect([[
^ |
~ |
~ |
~ |*2
E91: 'shell' option is empty |
]])
end)
@ -188,8 +187,7 @@ local function test_terminal_with_fake_shell(backslash)
feed_command('terminal')
screen:expect([[
^interact $ |
|
|
|*2
:terminal |
]])
end)

View File

@ -37,10 +37,7 @@ describe(':terminal highlight', function()
screen:expect([[
tty ready |
{10: } |
|
|
|
|
|*4
{5:-- TERMINAL --} |
]])
end)
@ -64,10 +61,7 @@ describe(':terminal highlight', function()
screen:expect(sub([[
tty ready |
{NUM:text}text{10: } |
|
|
|
|
|*4
{5:-- TERMINAL --} |
]]))
end
@ -194,10 +188,7 @@ describe(':terminal highlight forwarding', function()
screen:expect([[
tty ready |
{1: } |
|
|
|
|
|*4
{2:-- TERMINAL --} |
]])
end)
@ -213,10 +204,7 @@ describe(':terminal highlight forwarding', function()
screen:expect{grid=[[
tty ready |
{3:text}{4:color}text{1: } |
|
|
|
|
|*4
{2:-- TERMINAL --} |
]]}
end)
@ -246,10 +234,7 @@ describe(':terminal highlight with custom palette', function()
screen:expect([[
tty ready |
{7: } |
|
|
|
|
|*4
{9:-- TERMINAL --} |
]])
end)
@ -263,10 +248,7 @@ describe(':terminal highlight with custom palette', function()
screen:expect([[
tty ready |
{1:text}text{7: } |
|
|
|
|
|*4
{9:-- TERMINAL --} |
]])
end)

View File

@ -362,11 +362,7 @@ describe(':terminal prints more lines than the screen height and exits', functio
-- closes the buffer correctly after pressing a key
screen:expect([[
^ |
~ |
~ |
~ |
~ |
~ |
~ |*5
|
]])
end)
@ -614,10 +610,7 @@ describe("pending scrollback line handling", function()
or {'printf', ('hi\n'):rep(12)}
)
screen:expect [[
hi |
hi |
hi |
hi |
hi |*4
|
[Process exited 0]{2: } |
{3:-- TERMINAL --} |

File diff suppressed because it is too large Load Diff

View File

@ -121,11 +121,7 @@ describe(':terminal window', function()
screen:expect([[
tty ready |
{2:^ } |
|
|
|
|
|
|*5
]])
feed(':set colorcolumn=20<CR>i')
end)
@ -134,10 +130,7 @@ describe(':terminal window', function()
screen:expect([[
tty ready |
{1: } |
|
|
|
|
|*4
{3:-- TERMINAL --} |
]])
end)
@ -185,20 +178,12 @@ describe(':terminal with multigrid', function()
it('resizes to requested size', function()
screen:expect([[
## grid 1
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
tty ready |
{1: } |
|
|
|
|
|*4
## grid 3
{3:-- TERMINAL --} |
]])
@ -209,24 +194,13 @@ describe(':terminal with multigrid', function()
else
screen:expect([[
## grid 1
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
tty ready |
rows: 10, cols: 20 |
{1: } |
|
|
|
|
|
|
|
|*7
## grid 3
{3:-- TERMINAL --} |
]])
@ -238,12 +212,7 @@ describe(':terminal with multigrid', function()
else
screen:expect([[
## grid 1
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
rows: 10, cols: 20 |
@ -260,12 +229,7 @@ describe(':terminal with multigrid', function()
else
screen:expect([[
## grid 1
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|
[2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
tty ready |

View File

@ -50,8 +50,7 @@ describe(':terminal', function()
tty ready |
rows: 5, cols: 50 |
{2: } |
|
|
|*2
========== |
:2split |
]])
@ -63,8 +62,7 @@ describe(':terminal', function()
^tty ready |
rows: 5, cols: 50 |
{2: } |
|
|
|*2
========== |
:wincmd p |
]])
@ -80,14 +78,7 @@ describe(':terminal', function()
screen:expect([[
tty ready |
^foo{2: } |
|
|
|
|
|
|
|
|
|*8
]])
end)
@ -112,9 +103,7 @@ describe(':terminal', function()
tty ready |
rows: 7, cols: 47 |
{2: } |
|
|
|
|*3
^ |
|
]])

View File

@ -157,10 +157,7 @@ void ui_refresh(void)
{1:3} } |
{1:2} } |
{1:│}^} |
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*4
{3:[No Name] [+] }|
{1:-}void ui_refresh(void) |
{1:│}{ |
@ -181,9 +178,7 @@ void ui_refresh(void)
{1:3} } |
{1:2} } |
{1:│}} |
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*3
{4:[No Name] [+] }|
|
]]}
@ -208,12 +203,7 @@ void ui_refresh(void)
{1:2} } |
{1:│} } |
{1: }} |
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*6
{3:[No Name] [+] }|
{1: } int width = INT_MAX, height = INT_MAX; |
{1: } bool ext_widgets[kUIExtCount]; |
@ -232,11 +222,7 @@ void ui_refresh(void)
{1:2} } |
{1:│} } |
{1: }} |
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*5
{4:[No Name] [+] }|
|
]]}
@ -264,10 +250,7 @@ void ui_refresh(void)
{1:3} } |
{1:2} } |
{1:│}} |
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*4
{3:[No Name] [+] }|
{1:-}void ui_refresh(void) |
{1:│}{ |
@ -288,9 +271,7 @@ void ui_refresh(void)
{1:3} } |
{1:2} } |
{1:│}} |
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*3
{4:[No Name] [+] }|
|
]]}
@ -324,12 +305,7 @@ void ui_refresh(void)
{1: } } |
{1: } } |
{1: }} |
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|*6
{4:[No Name] [+] }|
{1:+ }{2:+-- 9 lines: void ui_refresh(void)·······················}|
{1: } for (size_t i = 0; i < ui_count; i++) { |
@ -342,11 +318,7 @@ void ui_refresh(void)
{1: } ^} |
{1: } } |
{1: }} |
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|*5
{5:[No Name] [+] }|
|
]], attr_ids={
@ -409,9 +381,7 @@ void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, con
feed('ggVGzf')
screen:expect{grid=[[
{2:^void}{1: }{3:qsort}{4:(}{2:void}{1: }{5:*}{3:base}{4:,}{1: }{2:size_t}{1: }{3:nel}{4:,}{1: }{2:size_t}{1: }{3:width}{4:,}{1: }{2:int}{1: }{4:(}{5:*}{3:compa}|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]]}
end)
@ -465,9 +435,7 @@ end]])
feed('ggVGzf')
screen:expect{grid=[[
{1:^+-- 19 lines: void qsort(void *base, size_t nel, size_t widt}|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
|
]]}
end)

View File

@ -100,17 +100,7 @@ local injection_grid_c = [[
return 42; \ |
} |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*11
|
]]
@ -121,17 +111,7 @@ local injection_grid_expected_c = [[
{4:return} {5:42}; \ |
} |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*11
|
]]
@ -178,8 +158,7 @@ describe('treesitter highlighting (C)', function()
1, (void *)(ptrdiff_t)cb); |
return 0; |
^} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
@ -204,8 +183,7 @@ describe('treesitter highlighting (C)', function()
{5:1}, ({3:void} *)({3:ptrdiff_t})cb); |
{4:return} {5:0}; |
^} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
@ -227,8 +205,7 @@ describe('treesitter highlighting (C)', function()
{5:1}, ({3:void} *)({3:ptrdiff_t})cb); |
{4:return} {5:0}; |
} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
@ -366,8 +343,7 @@ describe('treesitter highlighting (C)', function()
{4:for} ({3:UIExtension} i = {5:0}; ({3:int})i < kUIExtCount; i++) { |
{4:for} ({3:size_t} i = {5:0}; i < ui_count; i++) { |
{3:int} width = {5:INT_MAX}, height = {5:INT_MAX}; |
} |
} |
} |*2
{3:void} ui_refresh({3:void}) |
:sort |
]]}
@ -517,17 +493,7 @@ describe('treesitter highlighting (C)', function()
{4:return} {5:42}; \ |
} |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*11
|
]]}
end)
@ -556,8 +522,7 @@ describe('treesitter highlighting (C)', function()
{5:1}, ({3:void} *)({3:ptrdiff_t})cb); |
{4:return} {5:0}; |
^} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
@ -580,8 +545,7 @@ describe('treesitter highlighting (C)', function()
{5:1}, ({3:void} *)({3:ptrdiff_t})cb); |
{4:return} {5:0}; |
^} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
screen:expect{ unchanged=true }
@ -608,17 +572,7 @@ describe('treesitter highlighting (C)', function()
{8: }{12:return}{8: 42; \} |
{8: }} |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*11
|
]], attr_ids={
[1] = {bold = true, foreground = Screen.colors.Blue1};
@ -641,21 +595,7 @@ describe('treesitter highlighting (C)', function()
screen:expect{grid=[[
char* x = "Will somebody ever read this?"; |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*15
|
]]}
@ -672,21 +612,7 @@ describe('treesitter highlighting (C)', function()
screen:expect{grid=[[
{3:char}* x = {5:"Will somebody ever read this?"}; |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*15
|
]]}
@ -695,21 +621,7 @@ describe('treesitter highlighting (C)', function()
screen:expect{grid=[[
{5:char}* x = {5:"Will somebody ever read this?"}; |
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*15
|
]]}
end)
@ -747,8 +659,7 @@ describe('treesitter highlighting (C)', function()
1, (void *)(ptrdiff_t)cb); |
return 0; |
^} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
end)

View File

@ -51,11 +51,7 @@ describe('Buffer highlighting', function()
screen:expect([[
these are some lines |
with colorful tex^t |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
@ -65,11 +61,7 @@ describe('Buffer highlighting', function()
screen:expect([[
these are {2:some} lines |
with {3:colorful tex^t} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
@ -78,10 +70,7 @@ describe('Buffer highlighting', function()
these are {2:some} lines |
^ |
with {3:colorful text} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
@ -90,10 +79,7 @@ describe('Buffer highlighting', function()
these are some lines |
^ |
with colorful text |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
end)
@ -129,9 +115,7 @@ describe('Buffer highlighting', function()
in {6:order} to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} source^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
end)
@ -143,9 +127,7 @@ describe('Buffer highlighting', function()
in {6:order} to de{4:monstr}ate |
combin{9:ing hi}ghlights |
{9:from diff}erent source^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
end)
@ -157,9 +139,7 @@ describe('Buffer highlighting', function()
in {6:order} to de{4:monstr}ate |
combin{9:ing hi}ghlights |
{9:from diff}erent source^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
end)
@ -171,9 +151,7 @@ describe('Buffer highlighting', function()
in order to {7:demonstrate} |
{7:combining} highlights |
from {7:different} source^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
end)
@ -187,9 +165,7 @@ describe('Buffer highlighting', function()
in {6:order} to de{4:monstr}ate |
{7:combining} highlights |
from {7:different} source^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
end)
@ -201,9 +177,7 @@ describe('Buffer highlighting', function()
^ |
in {6:order} to {7:de}{5:monstr}{7:ate} |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
@ -216,9 +190,7 @@ describe('Buffer highlighting', function()
|
{8:from different sources} |
{8:^in }{20:order}{8: to demonstrate} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
--screen:expect([[
@ -226,9 +198,7 @@ describe('Buffer highlighting', function()
-- |
-- {9:from }{8:diff}{7:erent} sources |
-- ^in {6:order} to {7:de}{5:monstr}{7:ate} |
-- {1:~ }|
-- {1:~ }|
-- {1:~ }|
-- {1:~ }|*3
-- |
--]])
@ -238,9 +208,7 @@ describe('Buffer highlighting', function()
^ |
in {6:order} to {7:de}{5:monstr}{7:ate} |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 change; before #4 {MATCH:.*}|
]]}
@ -249,10 +217,7 @@ describe('Buffer highlighting', function()
^a {5:longer} example |
in {6:order} to {7:de}{5:monstr}{7:ate} |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
1 line less; before #3 {MATCH:.*}|
]]}
@ -262,9 +227,7 @@ describe('Buffer highlighting', function()
in {6:order} to {7:de}{5:monstr}{7:ate} |
{7:^combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 more line; before #2 {MATCH:.*}|
]]}
end)
@ -276,9 +239,7 @@ describe('Buffer highlighting', function()
{7:combin}{8:ing}{9: hi}ghlights |
^in {6:order} to {7:de}{5:monstr}{7:ate} |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
@ -288,9 +249,7 @@ describe('Buffer highlighting', function()
{9:from }{8:diff}{7:erent} sources |
a {5:longer} example |
{7:^combin}{8:ing}{9: hi}ghlights |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
@ -300,9 +259,7 @@ describe('Buffer highlighting', function()
{7:combin}{8:ing}{9: hi}ghlights |
^in {6:order} to {7:de}{5:monstr}{7:ate} |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
2 changes; before #3 {MATCH:.*}|
]]}
@ -312,9 +269,7 @@ describe('Buffer highlighting', function()
^in {6:order} to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 change; before #2 {MATCH:.*}|
]]}
end)
@ -327,9 +282,7 @@ describe('Buffer highlighting', function()
in {6:order} to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
@ -339,9 +292,7 @@ describe('Buffer highlighting', function()
in {6:order} to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 change; before #2 {MATCH:.*}|
]]}
@ -352,9 +303,7 @@ describe('Buffer highlighting', function()
in {6:ordAAAA^r} to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{7:-- INSERT --} |
]]}
@ -364,9 +313,7 @@ describe('Buffer highlighting', function()
in {6:ordAAAAr} t^o |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
@ -376,9 +323,7 @@ describe('Buffer highlighting', function()
in {6:ordAAAAr} to^ {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 change; before #4 {MATCH:.*}|
]]}
@ -388,9 +333,7 @@ describe('Buffer highlighting', function()
in {6:ord^er} to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 change; before #3 {MATCH:.*}|
]]}
end)
@ -401,10 +344,7 @@ describe('Buffer highlighting', function()
a {5:longer} example in {6:order} to {7:de}{5:monstr}{7:ate}|
{7:combin}{8:ing}{9: hi}ghlights^ {9:from }{8:diff}{7:erent} sou|
rces |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]]}
@ -414,9 +354,7 @@ describe('Buffer highlighting', function()
in {6:order} to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 more line; before #2 {MATCH:.*}|
]]}
end)
@ -429,8 +367,7 @@ describe('Buffer highlighting', function()
^ to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7:-- INSERT --} |
]]}
@ -453,8 +390,7 @@ describe('Buffer highlighting', function()
to {7:de}{5:mo^nstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|*2
1 line less; before #3 {MATCH:.*}|
]]}
@ -464,9 +400,7 @@ describe('Buffer highlighting', function()
in {6:order}^ to {7:de}{5:monstr}{7:ate} |
{7:combin}{8:ing}{9: hi}ghlights |
{9:from }{8:diff}{7:erent} sources |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
1 line less; before #2 {MATCH:.*}|
]]}
end)
@ -481,24 +415,14 @@ describe('Buffer highlighting', function()
screen:expect([[
{4:three ove}{6:rlapp}{2:ing color}^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]])
clear_namespace(id, 0, 1)
screen:expect([[
three {6:overlapp}{2:ing color}^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]])
end)
@ -512,24 +436,14 @@ describe('Buffer highlighting', function()
screen:expect{grid=[[
{4:three }{6:overlapp}{2:ing color}^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]}
clear_namespace(id, 0, 1)
screen:expect{grid=[[
three {6:overlapp}{2:ing color}^s |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]}
end)
@ -554,24 +468,14 @@ describe('Buffer highlighting', function()
screen:expect [[
{3:fooba}{2:^r} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]
clear_namespace(id, 0, -1)
screen:expect{grid=[[
fooba^r |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]}
@ -590,12 +494,7 @@ describe('Buffer highlighting', function()
screen:expect [[
{3:fooba}{2:^r} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]]
end)
@ -608,12 +507,7 @@ describe('Buffer highlighting', function()
screen:expect([[
Ta {6:båten} över {2:sjön}^! |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]])
end)
@ -624,24 +518,14 @@ describe('Buffer highlighting', function()
add_highlight(-1, "FancyLangItem", 0, 0, 5)
screen:expect([[
fancy code in a new fancy languag^e |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]])
command('hi FancyLangItem guifg=red')
screen:expect([[
{10:fancy} code in a new fancy languag^e |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
|
]])
end)
@ -661,8 +545,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, |
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -680,8 +563,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -692,8 +574,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -706,8 +587,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -718,8 +598,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -732,9 +611,7 @@ describe('Buffer highlighting', function()
^5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, {12:暗x事zz速野谷質結育}|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
--screen:expect([[
@ -742,9 +619,7 @@ describe('Buffer highlighting', function()
-- ^5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
-- , 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
-- x = 4 |
-- {1:~ }|
-- {1:~ }|
-- {1:~ }|
-- {1:~ }|*3
-- |
--]])
end)
@ -796,8 +671,7 @@ describe('Buffer highlighting', function()
{13:5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}|
{13:, 5, 5, 5, 5, 5, 5, } Lorem ipsum dolor s|
^x{13: = 4} |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7:-- VISUAL LINE --} |
]])
@ -808,8 +682,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
^x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -821,8 +694,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -833,8 +705,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7:-- VISUAL --} |
]])
@ -845,8 +716,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
{7:-- VISUAL --} |
]])
end)
@ -860,8 +730,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5,{1:-$}Lorem ipsum dolor s|
x = 4{1:$} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
@ -872,8 +741,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5,{1:-$} |
x = 4{1:$} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]])
end)
@ -887,8 +755,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
@ -899,8 +766,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
@ -912,8 +778,7 @@ describe('Buffer highlighting', function()
{14:^5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}|
{14:, 5, 5, 5, 5, 5, 5, }Lorem ipsum dolor s|
x = 4 |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
end)
@ -926,8 +791,7 @@ describe('Buffer highlighting', function()
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 {12:暗x事} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
@ -938,8 +802,7 @@ describe('Buffer highlighting', function()
5, 5, 5,{18: }5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
x = 4 {12:暗x事} |
{1:~ }|
{1:~ }|
{1:~ }|*2
|
]]}
end)

View File

@ -182,100 +182,55 @@ describe('Command-line coloring', function()
start_prompt()
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:^ |
]])
feed('e')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:e^ |
]])
feed('cho ')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo ^ |
]])
feed('(')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}^ |
]])
feed('(')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}{RBP2:(}^ |
]])
feed('42')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}{RBP2:(}42^ |
]])
feed('))')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}{RBP2:(}42{RBP2:)}{RBP1:)}^ |
]])
feed('<BS>')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}{RBP2:(}42{RBP2:)}^ |
]])
redraw_input()
screen:expect{grid=[[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}{RBP2:(}42{RBP2:)}^ |
]], reset=true}
end)
@ -285,12 +240,7 @@ describe('Command-line coloring', function()
start_prompt('echo')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo^ |
]])
end)
@ -301,8 +251,7 @@ describe('Command-line coloring', function()
start_prompt('echo "«')
screen:expect{grid=[[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
:echo " |
{ERR:E5405: Chunk 0 start 7 splits multibyte }|
@ -312,8 +261,7 @@ describe('Command-line coloring', function()
feed('»')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
:echo " |
{ERR:E5405: Chunk 0 start 7 splits multibyte }|
@ -327,8 +275,7 @@ describe('Command-line coloring', function()
start_prompt('echo "«')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
:echo " |
{ERR:E5406: Chunk 0 end 7 splits multibyte ch}|
@ -355,12 +302,7 @@ describe('Command-line coloring', function()
start_prompt('e')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:e^ |
]])
eq('', exec_capture('messages'))
@ -370,12 +312,7 @@ describe('Command-line coloring', function()
start_prompt('e')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:e^ |
]])
eq('', exec_capture('messages'))
@ -385,12 +322,7 @@ describe('Command-line coloring', function()
start_prompt('e')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:e^ |
]])
eq('', exec_capture('messages'))
@ -414,8 +346,7 @@ describe('Command-line coloring', function()
start_prompt('let x = "«»«»«»«»«»"')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
:let x = " |
{ERR:E5405: Chunk 0 start 10 splits multibyte}|
@ -425,12 +356,7 @@ describe('Command-line coloring', function()
feed('\n')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
|
]])
feed('\n')
@ -443,20 +369,14 @@ describe('Command-line coloring', function()
start_prompt('echo 42')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
|
]])
screen:sleep(500)
feed('<C-c>')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
: |
{ERR:E5407: Callback has thrown an exception:}|
@ -466,23 +386,13 @@ describe('Command-line coloring', function()
redraw_input()
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo 42^ |
]])
feed('\n')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo 42 |
]])
feed('\n')
@ -490,12 +400,7 @@ describe('Command-line coloring', function()
feed('<C-c>')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
Type :qa and pre...nter> to exit Nvim |
]])
end)
@ -504,12 +409,7 @@ describe('Command-line coloring', function()
start_prompt('echo ("<C-v><CR><C-v><Nul><C-v><NL>")')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}"{SK:^M^@^@}"{RBP1:)}^ |
]])
end)
@ -519,9 +419,7 @@ describe('Command-line coloring', function()
start_prompt('#')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*3
{MSEP: }|
: |
{ERR:E5400: Callback should return list} |
@ -533,9 +431,7 @@ describe('Command-line coloring', function()
start_prompt('#')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*3
{MSEP: }|
: |
{ERR:E5401: List item 1 is not a List} |
@ -547,8 +443,7 @@ describe('Command-line coloring', function()
start_prompt('+')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
:+ |
{ERR:E5402: List item 1 has incorrect length:}|
@ -561,8 +456,7 @@ describe('Command-line coloring', function()
start_prompt('+')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
:+ |
{ERR:E5403: Chunk 1 start 2 not in range [1, }|
@ -575,9 +469,7 @@ describe('Command-line coloring', function()
start_prompt('+')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*3
{MSEP: }|
:+ |
{ERR:E5404: Chunk 1 end 3 not in range (1, 2]}|
@ -616,12 +508,7 @@ describe('Command-line coloring', function()
start_prompt('1')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:{RBP1:1}^ |
]])
@ -629,12 +516,7 @@ describe('Command-line coloring', function()
start_prompt('2')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:{RBP2:2}^ |
]])
@ -642,12 +524,7 @@ describe('Command-line coloring', function()
start_prompt('3')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:{RBP3:3}^ |
]])
@ -655,57 +532,32 @@ describe('Command-line coloring', function()
start_prompt('4')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:{RBP4:4}^ |
]])
feed('<CR>')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:{RBP3:3}4^ |
]])
feed('<CR>')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:{RBP2:2}34^ |
]])
feed('<CR>')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:{RBP1:1}234^ |
]])
feed('<CR><CR><C-l>')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
|
]])
eq('1234', meths.get_var('out'))
@ -763,12 +615,7 @@ describe('Ex commands coloring', function()
feed(':echo (((1)))')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:echo {RBP1:(}{RBP2:(}{RBP3:(}1{RBP3:)}{RBP2:)}{RBP1:)}^ |
]])
end)
@ -802,8 +649,7 @@ describe('Ex commands coloring', function()
feed(':debug execute "echo 1"\n')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
Entering Debug mode. Type "cont" to con|
tinue. |
@ -824,12 +670,7 @@ describe('Ex commands coloring', function()
feed('\n')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
|
]])
end)
@ -838,8 +679,7 @@ describe('Ex commands coloring', function()
feed(':#x')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*2
{MSEP: }|
:# |
{ERR:Error detected while processing :} |
@ -885,12 +725,7 @@ describe('Expressions coloring support', function()
feed(':echo <C-r>=(((1)))')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
={NPAR:(((}{NUM:1}{NPAR:)))}^ |
]])
end)
@ -902,12 +737,7 @@ describe('Expressions coloring support', function()
feed(':<C-r>=1')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
={NUM:1}^ |
]])
end)
@ -921,34 +751,19 @@ describe('Expressions coloring support', function()
feed('i<C-r>="«»"«»')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
={SQ:"}{SB:«»}{SQ:"}{E:«»}^ |
]])
feed('<C-c>')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
{M:-- INSERT --} |
]])
feed('<Esc>')
screen:expect([[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
|
]])
feed(':<C-\\>e"<C-v><C-x>"<C-v><C-x>')
@ -956,35 +771,20 @@ describe('Expressions coloring support', function()
-- highlighting.
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
={SQ:"}{SB:^X}{SQ:"}{ERR:^X}^ |
]])
feed('<C-c>')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
:^ |
]])
funcs.setreg('a', {'\192'})
feed('<C-r>="<C-r><C-r>a"<C-r><C-r>a"foo"')
screen:expect([[
|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*6
={SQ:"}{SB:<c0>}{SQ:"}{E:<c0>"}{SB:foo}{E:"}^ |
]])
end)

View File

@ -41,9 +41,7 @@ local function test_cmdline(linegrid)
feed(':')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -54,9 +52,7 @@ local function test_cmdline(linegrid)
feed('sign')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -67,9 +63,7 @@ local function test_cmdline(linegrid)
feed('<Left>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -80,9 +74,7 @@ local function test_cmdline(linegrid)
feed('<bs>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -93,9 +85,7 @@ local function test_cmdline(linegrid)
feed('<Esc>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
end)
@ -104,9 +94,7 @@ local function test_cmdline(linegrid)
feed(':call input("input", "default")<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
prompt = "input",
@ -117,9 +105,7 @@ local function test_cmdline(linegrid)
feed('<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
end)
@ -128,9 +114,7 @@ local function test_cmdline(linegrid)
feed(':xx<c-r>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -142,9 +126,7 @@ local function test_cmdline(linegrid)
feed('=')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -171,9 +153,7 @@ local function test_cmdline(linegrid)
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline=expectation}
@ -181,9 +161,7 @@ local function test_cmdline(linegrid)
command("mode")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline=expectation, reset=true}
@ -191,9 +169,7 @@ local function test_cmdline(linegrid)
feed('<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -204,9 +180,7 @@ local function test_cmdline(linegrid)
feed('<esc>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
end)
@ -215,9 +189,7 @@ local function test_cmdline(linegrid)
feed(':function Foo()<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
indent = 2,
@ -231,9 +203,7 @@ local function test_cmdline(linegrid)
feed('line1<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
indent = 2,
@ -248,9 +218,7 @@ local function test_cmdline(linegrid)
command("mode")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
indent = 2,
@ -265,9 +233,7 @@ local function test_cmdline(linegrid)
feed('endfunction<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
@ -275,9 +241,7 @@ local function test_cmdline(linegrid)
feed(':function Bar()<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
indent = 2,
@ -291,9 +255,7 @@ local function test_cmdline(linegrid)
feed('endfunction<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
@ -303,9 +265,7 @@ local function test_cmdline(linegrid)
feed(':make')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -374,9 +334,7 @@ local function test_cmdline(linegrid)
command("redraw!")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -389,9 +347,7 @@ local function test_cmdline(linegrid)
feed(":call inputsecret('secret:')<cr>abc123")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
prompt = "secret:",
@ -434,9 +390,7 @@ local function test_cmdline(linegrid)
feed('<f5>(a(b)a)')
screen:expect{grid=[[
^ |
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|*3
|
]], cmdline={{
prompt = '>',
@ -463,9 +417,7 @@ local function test_cmdline(linegrid)
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -476,9 +428,7 @@ local function test_cmdline(linegrid)
feed('<tab>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -489,9 +439,7 @@ local function test_cmdline(linegrid)
feed('<left><left>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -502,9 +450,7 @@ local function test_cmdline(linegrid)
feed('<right>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -515,9 +461,7 @@ local function test_cmdline(linegrid)
feed('a')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -543,9 +487,7 @@ local function test_cmdline(linegrid)
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -556,9 +498,7 @@ local function test_cmdline(linegrid)
feed('<tab>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -569,9 +509,7 @@ local function test_cmdline(linegrid)
feed('<left><left>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -582,9 +520,7 @@ local function test_cmdline(linegrid)
feed('<right>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -595,9 +531,7 @@ local function test_cmdline(linegrid)
feed('a')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -645,9 +579,7 @@ local function test_cmdline(linegrid)
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
firstc = ":",
@ -663,9 +595,7 @@ local function test_cmdline(linegrid)
feed(':xa')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]], cmdline={{
content = { { "x" } },
@ -679,9 +609,7 @@ local function test_cmdline(linegrid)
feed('<esc>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
end)
@ -748,26 +676,20 @@ describe('cmdline redraw', function()
feed('q:iabc<Esc>vhh')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] }|
{1::}^a{8:bc} |
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:[Command Line] }|
{9:-- VISUAL --} |
]])
feed('<C-C>')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] }|
{1::}a{8:bc} |
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:[Command Line] }|
:^abc |
]])
@ -778,18 +700,14 @@ describe('cmdline redraw', function()
meths.buf_set_lines(0, 0, -1, true, {"let's rock!"})
screen:expect{grid=[[
!kcor s'te^l|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
|
]]}
feed '/'
screen:expect{grid=[[
!kcor s'tel|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
^ /|
]]}
@ -798,9 +716,7 @@ describe('cmdline redraw', function()
-- when rendered as a block so it touches the end of the text
screen:expect{grid=[[
!kcor {2:s'tel}|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
^ s'tel/|
]]}
@ -808,45 +724,35 @@ describe('cmdline redraw', function()
feed "<space>"
screen:expect{grid=[[
!kcor{2: s'tel}|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
^ s'tel/|
]]}
feed "rock"
screen:expect{grid=[[
!{2:kcor s'tel}|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
^ kcor s'tel/|
]]}
feed "<right>"
screen:expect{grid=[[
!{2:kcor s'tel}|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
^kcor s'tel/|
]]}
feed "<left>"
screen:expect{grid=[[
!{2:kcor s'tel}|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
^ kcor s'tel/|
]]}
feed "<cr>"
screen:expect{grid=[[
!{10:kcor s'te^l}|
{1: ~}|
{1: ~}|
{1: ~}|
{1: ~}|*3
kcor s'tel/ |
]]}
end)
@ -865,8 +771,7 @@ describe('statusline is redrawn on entering cmdline', function()
command('set statusline=%{mode()}')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:n }|
|
]]}
@ -874,8 +779,7 @@ describe('statusline is redrawn on entering cmdline', function()
feed(':')
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:c }|
:^ |
]]}
@ -887,8 +791,7 @@ describe('statusline is redrawn on entering cmdline', function()
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:n }|
|
]]}
@ -896,8 +799,7 @@ describe('statusline is redrawn on entering cmdline', function()
feed(';')
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:c }|
:^ |
]]}
@ -919,11 +821,7 @@ describe('statusline is redrawn on entering cmdline', function()
|
{3:c1 }|
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
{3: }|
{4:E121: Undefined variable: doesnotex}|
{4:ist} |
@ -936,8 +834,7 @@ describe('statusline is redrawn on entering cmdline', function()
|
{3:c2 }|
|
{1:~ }|
{1:~ }|
{1:~ }|*2
{3: }|
{4:E121: Undefined variable: doesnotex}|
{4:ist} |
@ -972,14 +869,7 @@ describe('statusline is redrawn on entering cmdline', function()
^ |
{3:n3 }|
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*8
{2:[No Name] }|
|
]]}
@ -990,8 +880,7 @@ describe('statusline is redrawn on entering cmdline', function()
command('set statusline=')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:[No Name] }|
|
]]}
@ -1002,8 +891,7 @@ describe('statusline is redrawn on entering cmdline', function()
feed(':')
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:command }|
:^ |
]]}
@ -1014,8 +902,7 @@ describe('statusline is redrawn on entering cmdline', function()
feed(':')
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:command }|
:^ |
]]}
@ -1104,17 +991,12 @@ describe('cmdheight=0', function()
command("set redrawdebug=invalid cmdheight=0 noruler laststatus=0")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]]}
feed(":resize -1<CR>")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]]}
assert_alive()
@ -1124,8 +1006,7 @@ describe('cmdheight=0', function()
command("set cmdheight=1 noruler laststatus=2")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
|
]]}
@ -1135,9 +1016,7 @@ describe('cmdheight=0', function()
command("set cmdheight=0 noruler laststatus=2")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] }|
]]}
end)
@ -1146,10 +1025,7 @@ describe('cmdheight=0', function()
command("set cmdheight=0 ruler laststatus=0")
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]]}
end)
@ -1158,10 +1034,7 @@ describe('cmdheight=0', function()
feed('i')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]], showmode={}}
feed('<Esc>')
eq(0, eval('&cmdheight'))
@ -1172,10 +1045,7 @@ describe('cmdheight=0', function()
feed('i')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]], showmode={}}
feed('<Esc>')
eq(0, eval('&cmdheight'))
@ -1186,9 +1056,7 @@ describe('cmdheight=0', function()
feed('i')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{3:-- INSERT --} |
]]}
feed('<Esc>')
@ -1200,19 +1068,14 @@ describe('cmdheight=0', function()
feed(':')
screen:expect{grid=[[
|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
:^ |
]]}
eq(0, eval('&cmdheight'))
feed('<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]], showmode={}}
eq(0, eval('&cmdheight'))
end)
@ -1231,10 +1094,7 @@ describe('cmdheight=0', function()
feed('<cr>')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]], showmode={}}
eq(0, eval('&cmdheight'))
end)
@ -1253,24 +1113,21 @@ describe('cmdheight=0', function()
screen:expect{grid=[[
{3:foo }|
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
]]}
feed(':')
screen:expect{grid=[[
{3:foo }|
|
{1:~ }|
{1:~ }|
{1:~ }|*2
:^ |
]]}
feed('<Esc>')
screen:expect{grid=[[
{3:foo }|
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
]], showmode={}}
eq(0, eval('&cmdheight'))
@ -1283,18 +1140,12 @@ describe('cmdheight=0', function()
feed('qq')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]]}
feed('q')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]], unchanged=true}
end)
@ -1303,27 +1154,21 @@ describe('cmdheight=0', function()
feed('ifoo<ESC>')
screen:expect{grid=[[
fo^o |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] [+] }|
]]}
feed(':%s/foo/bar/gc<CR>')
screen:expect{grid=[[
{6:foo} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{5:replace wi...q/l/^E/^Y)?}^ |
]]}
feed('y')
screen:expect{grid=[[
^bar |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] [+] }|
]]}
@ -1342,19 +1187,13 @@ describe('cmdheight=0', function()
feed('iaabbaa<esc>/aa<cr>')
screen:expect{grid=[[
{7:^aa}bb{7:aa} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]]}
feed('<f3>')
screen:expect{grid=[[
^aabbaa |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]]}
end)
@ -1364,10 +1203,7 @@ describe('cmdheight=0', function()
-- doesn't crash while not displaying silent! error message
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]]}
end)
@ -1377,17 +1213,10 @@ describe('cmdheight=0', function()
meths.buf_set_lines(0, 0, -1, true, {'p'})
screen:expect{grid=[[
## grid 1
[2:-------------------------]|
[2:-------------------------]|
[2:-------------------------]|
[2:-------------------------]|
[2:-------------------------]|
[2:-------------------------]|*5
## grid 2
^p |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
## grid 3
]], win_viewport={
[2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
@ -1396,17 +1225,11 @@ describe('cmdheight=0', function()
feed '/p'
screen:expect{grid=[[
## grid 1
[2:-------------------------]|
[2:-------------------------]|
[2:-------------------------]|
[2:-------------------------]|
[2:-------------------------]|*4
[3:-------------------------]|
## grid 2
{6:p} |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
## grid 3
/p^ |
]], win_viewport={
@ -1423,8 +1246,7 @@ describe('cmdheight=0', function()
screen:expect([[
{3:c :}|
|
{1:~ }|
{1:~ }|
{1:~ }|*2
:^ |
]])
feed('echo')
@ -1432,16 +1254,14 @@ describe('cmdheight=0', function()
screen:expect([[
{3:c :}|
|
{1:~ }|
{1:~ }|
{1:~ }|*2
:echo^ |
]])
command('redrawstatus')
screen:expect([[
{3:c :echo}|
|
{1:~ }|
{1:~ }|
{1:~ }|*2
:echo^ |
]])
end)
@ -1452,28 +1272,17 @@ describe('cmdheight=0', function()
command('vsplit')
screen:expect([[
^ │ |
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*8
]])
feed(':')
command('split')
feed('<Esc>')
screen:expect([[
^ │ |
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*3
{2:[No Name] }│{1:~ }|
│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*3
]])
command('resize 2')
screen:expect([[
@ -1481,25 +1290,17 @@ describe('cmdheight=0', function()
{1:~ }│{1:~ }|
{2:[No Name] }│{1:~ }|
│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*5
]])
feed(':')
command('wincmd =')
feed('<Esc>')
screen:expect([[
^ │ |
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*3
{2:[No Name] }│{1:~ }|
│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|
{1:~ }│{1:~ }|*3
]])
end)
@ -1508,10 +1309,7 @@ describe('cmdheight=0', function()
feed('d')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
]])
assert_alive()
end)
@ -1521,33 +1319,27 @@ describe('cmdheight=0', function()
command('resize +1')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
|
]])
command('set cmdheight=0')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] }|
]]}
command('resize -1')
screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|*2
{2:[No Name] }|
|
]]}
command('resize +1')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] }|
]])
end)
@ -1559,9 +1351,7 @@ describe('cmdheight=0', function()
command('resize -1')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{3:[No Name] }|
]])
meths.input_mouse('left', 'press', '', 0, 6, 10)

View File

@ -186,9 +186,7 @@ describe('ui/cursor', function()
command("echo 'test'")
screen:expect{grid=[[
^ |
~ |
~ |
~ |
~ |*3
test |
]], condition=function()
eq(nil, screen._mode_info)
@ -255,9 +253,7 @@ describe('ui/cursor', function()
end
screen:expect{grid=[[
^ |
~ |
~ |
~ |
~ |*3
test |
]], condition=function()
eq(expected_mode_info, screen._mode_info)

File diff suppressed because it is too large Load Diff

View File

@ -68,12 +68,7 @@ describe('Diff mode screen', function()
{1: }5 │{1: }5 |
{1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -88,12 +83,7 @@ describe('Diff mode screen', function()
{1: }5 │{1: }5 |
{1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -114,12 +104,7 @@ describe('Diff mode screen', function()
{1: }5 │{1: }5 |
{1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -134,12 +119,7 @@ describe('Diff mode screen', function()
{1: }5 │{1: }5 |
{1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -160,12 +140,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -180,12 +155,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -219,12 +189,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -239,12 +204,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -282,8 +242,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*2
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -302,8 +261,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*2
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -328,8 +286,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*2
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -348,8 +305,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 |
{1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*2
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -578,11 +534,7 @@ int main(int argc, char **argv)
{1: }{2:------------------}│{1: }{4: values.each do }|
{1: } v.finalize │{1: } v.finalize |
{1: } end │{1: } end |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*5
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=internal,filler |
]])
@ -601,11 +553,7 @@ int main(int argc, char **argv)
{1: } values.each do |│{1: } values.each do |
{1: } v.finalize │{1: } v.finalize |
{1: } end │{1: } end |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*5
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
|
]])
@ -625,11 +573,7 @@ int main(int argc, char **argv)
{1: } values.each do |│{1: } values.each do |
{1: } v.finalize │{1: } v.finalize |
{1: } end │{1: } end |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*5
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
: |
]])
@ -644,19 +588,7 @@ int main(int argc, char **argv)
feed(':set diffopt=filler<cr>')
screen:expect([[
{1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*13
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -664,19 +596,7 @@ int main(int argc, char **argv)
feed(':set diffopt+=internal<cr>')
screen:expect([[
{1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*13
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -690,19 +610,7 @@ int main(int argc, char **argv)
feed(':set diffopt=filler<cr>')
screen:expect([[
{1:- }^ │{1:- } |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*13
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler |
]])
@ -710,19 +618,7 @@ int main(int argc, char **argv)
feed(':set diffopt+=internal<cr>')
screen:expect([[
{1:- }^ │{1:- } |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*13
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -738,17 +634,7 @@ int main(int argc, char **argv)
{1: }^a │{1: }A |
{1: }b │{1: }b |
{1: }{9:cd }│{1: }{9:cD}{8:e}{9: }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler,icase |
]])
@ -758,17 +644,7 @@ int main(int argc, char **argv)
{1: }^a │{1: }A |
{1: }b │{1: }b |
{1: }{9:cd }│{1: }{9:cD}{8:e}{9: }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal |
]])
@ -795,12 +671,7 @@ int main(int argc, char **argv)
{1: } return 0; │{1: } return 0; |
{1: }{2:------------------}│{1: }{4: } }|
{1: }} │{1: }} |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler,iwhite |
]])
@ -818,12 +689,7 @@ int main(int argc, char **argv)
{1: } return 0; │{1: } return 0; |
{1: }{2:------------------}│{1: }{4: } }|
{1: }} │{1: }} |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler,iwhite,internal |
]])
@ -842,19 +708,12 @@ int main(int argc, char **argv)
feed(':set diffopt=internal,filler,iblank<cr>')
screen:expect([[
{1: }^a │{1: }a |
{1: }{4: }│{1: }{2:-----------------}|
{1: }{4: }│{1: }{2:-----------------}|
{1: }{4: }│{1: }{2:-----------------}|*2
{1: }cd │{1: }cd |
{1: }ef │{1: } |
{1: }{8:xxx}{9: }│{1: }ef |
{6:~ }│{1: }{8:yyy}{9: }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*7
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=internal,filler,iblank |
]])
@ -871,14 +730,7 @@ int main(int argc, char **argv)
{1: }cd │{1: }ef |
{1: }ef │{1: }{8:yyy}{9: }|
{1: }{8:xxx}{9: }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*8
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
: |
]])
@ -895,14 +747,7 @@ int main(int argc, char **argv)
{1: }cd │{1: }ef |
{1: }ef │{1: }{8:yyy}{9: }|
{1: }{8:xxx}{9: }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*8
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
: |
]])
@ -919,14 +764,7 @@ int main(int argc, char **argv)
{1: }cd │{1: }ef |
{1: }ef │{1: }{8:yyy}{9: }|
{1: }{8:xxx}{9: }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*8
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
: |
]])
@ -953,12 +791,7 @@ int main(int argc, char **argv)
{1: }foo │{1: }foo |
{1: }{2:------------------}│{1: }{4: }|
{1: }bar │{1: }bar |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
: |
]])
@ -977,12 +810,7 @@ int main(int argc, char **argv)
{1: }foo │{1: }foo |
{1: }{2:------------------}│{1: }{4: }|
{1: }bar │{1: }bar |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*6
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
: |
]])
@ -1116,9 +944,7 @@ int main(int argc, char **argv)
{1: } ui.setupUI(Mai│{1: } ui.setupUI(Ma|
{1: } MainWindow.sho│{1: } MainWindow.sh|
{1: } sys.exit(app.e│{1: } sys.exit(app.|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*3
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=internal,filler |
]])
@ -1137,9 +963,7 @@ int main(int argc, char **argv)
{1: } ui.setupUI(Mai│{1: } ui.setupUI(Ma|
{1: } MainWindow.sho│{1: } MainWindow.sh|
{1: } ^sys.exit(app.e│{1: } sys.exit(app.|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*3
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=linematch:20 |
]])
@ -1163,17 +987,7 @@ ccca]]
{1: }^DDD │{1: }DDD |
{1: }{2:------------------}│{1: }{4:AAA }|
{1: }{8:_a}{9:a }│{1: }{8:ccc}{9:a }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
|
]])
@ -1182,17 +996,7 @@ ccca]]
{1: }^DDD │{1: }DDD |
{1: }{8:_}{9:aa }│{1: }{8:A}{9:AA }|
{1: }{2:------------------}│{1: }{4:ccca }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=icase |
]])
@ -1216,17 +1020,7 @@ AAAB]]
{1: }^BB │{1: }BB |
{1: }{9: AA}{8:A}{9: }│{1: }{9: AA}{8:B}{9: }|
{1: }{2:------------------}│{1: }{4:AAAB }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
|
]]}
@ -1235,17 +1029,7 @@ AAAB]]
{1: }^BB │{1: }BB |
{1: }{2:------------------}│{1: }{4: AAB }|
{1: }{9: AAA }│{1: }{9:AAA}{8:B}{9: }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=iwhiteall |
]]}
@ -1267,12 +1051,7 @@ AAAB]]
{6:~ }│{6:~ }|
{3:<onal-diff-screen-1 <l-diff-screen-1.2 }|
^ |
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|*6
{7:[No Name] }|
:e |
]]}
@ -1287,12 +1066,7 @@ AAAB]]
{6:~ }│{6:~ }|
{3:<-diff-screen-1 [+] <l-diff-screen-1.2 }|
^ |
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|*6
{7:[No Name] }|
:e |
]]}
@ -1317,8 +1091,7 @@ AAAB]]
ccc |
|
xx |
{6:~ }|
{6:~ }|
{6:~ }|*2
{7:Xtest-functional-diff-screen-1 }|
:e |
]]}
@ -1337,8 +1110,7 @@ AAAB]]
ccc |
|
xx |
{6:~ }|
{6:~ }|
{6:~ }|*2
{7:Xtest-functional-diff-screen-1 [+] }|
:e |
]]}
@ -1387,8 +1159,7 @@ it('win_update redraws lines properly', function()
command("windo 1")
screen:expect{grid=[[
{13: }{16:-----------------------}│{13: }{15:^1 }|
{13: }{16:-----------------------}│{13: }{15: }|
{13: }{16:-----------------------}│{13: }{15: }|
{13: }{16:-----------------------}│{13: }{15: }|*2
{13: }2 │{13: }2 |
{13: }{17:2}{18:a }│{13: }{17:1}{18:a }|
{13: }{15:2b }│{13: }{16:----------------------}|
@ -1445,8 +1216,7 @@ it('diff updates line numbers below filler lines', function()
{1: }a │{11: 1 }a |
{1: }a │{11: 2 }a |
{1: }{8:x}{9: }│{11: 3 }{8:y}{9: }|
{1: }{4:x }│{11: }{2:----------------}|
{1: }{4:x }│{11: }{2:----------------}|
{1: }{4:x }│{11: }{2:----------------}|*2
{1: }b │{11: 4 }b |
{1: }b │{11: 5 }b |
{1: }b │{11: 6 }b |
@ -1462,8 +1232,7 @@ it('diff updates line numbers below filler lines', function()
{1: }a │{10:2 }^a |
{1: }a │{11: 1 }a |
{1: }{8:x}{9: }│{11: 2 }{8:y}{9: }|
{1: }{4:x }│{11: }{2:----------------}|
{1: }{4:x }│{11: }{2:----------------}|
{1: }{4:x }│{11: }{2:----------------}|*2
{1: }b │{11: 3 }b |
{1: }b │{11: 4 }b |
{1: }b │{11: 5 }b |
@ -1479,8 +1248,7 @@ it('diff updates line numbers below filler lines', function()
{1: }a │{11: 1 }a |
{1: }a │{10:3 }^a |
{1: }{8:x}{9: }│{11: 1 }{8:y}{9: }|
{1: }{4:x }│{11: }{2:----------------}|
{1: }{4:x }│{11: }{2:----------------}|
{1: }{4:x }│{11: }{2:----------------}|*2
{1: }b │{11: 2 }b |
{1: }b │{11: 3 }b |
{1: }b │{11: 4 }b |
@ -1525,14 +1293,7 @@ it('Align the filler lines when changing text in diff mode', function()
{1: }13 │{1: }13 |
{1: }14 │{1: }14 |
{1:- }1^5 │{1:- }15 |
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|*8
{8:[No Name] [+] }{3:[No Name] [+] }|
|
]]}
@ -1548,14 +1309,7 @@ it('Align the filler lines when changing text in diff mode', function()
{1: }13 │{1: }13 |
{1: }14 │{1: }14 |
{1: }{5:15}{6:^x}{5: }│{1: }{5:15 }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|*8
{8:[No Name] [+] }{3:[No Name] [+] }|
|
]]}
@ -1571,14 +1325,7 @@ it('Align the filler lines when changing text in diff mode', function()
{1: }13 │{1: }13 |
{1: }14 │{1: }14 |
{1: }{5:15}{6:x}{5: }│{1: }{5:15}{6:^y}{5: }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|*8
{3:[No Name] [+] }{8:[No Name] [+] }|
|
]]}
@ -1594,10 +1341,7 @@ it("diff mode doesn't restore invalid 'foldcolumn' value #21647", function()
command('diffsplit | bd')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
|
]])
eq('0', meths.get_option_value('foldcolumn', {}))
@ -1636,17 +1380,7 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun
{1: }{5:E}{4: }│{1: }{5:e}{4: }|
{1: }f │{1: }f |
{1: }g │{1: }g |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{8:[No Name] [+] }{2:[No Name] [+] }|
|
]])
@ -1662,17 +1396,7 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun
{1: }E │{1: }e |
{1: }f │{1: }f |
{1: }g │{1: }g |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{8:[No Name] [+] }{2:[No Name] [+] }|
|
]])
@ -1688,17 +1412,7 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun
{1: }{5:E}{4: }│{1: }{5:e}{4: }|
{1: }f │{1: }f |
{1: }g │{1: }g |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{8:[No Name] [+] }{2:[No Name] [+] }|
|
]])
@ -1714,17 +1428,7 @@ it('diff mode works properly if file contains NUL bytes vim-patch:8.2.3925', fun
{1: }E │{1: }e |
{1: }f │{1: }f |
{1: }g │{1: }g |
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|*11
{8:[No Name] [+] }{2:[No Name] [+] }|
|
]])
@ -1751,11 +1455,9 @@ it("diff mode draws 'breakindent' correctly after filler lines", function()
screen:expect([[
{1: }a │{1: }a |
{1: }{2:b }│{1: }{3:--------------------}|
{1: } cccccccccccccccccc│{1: } cccccccccccccccccc|
{1: } cccccccccccccccccc│{1: } cccccccccccccccccc|
{1: } cccccccccccccccccc│{1: } cccccccccccccccccc|*2
{1: } cccccccccccccc │{1: } ccccccccccccc^c |
{4:~ }│{4:~ }|
{4:~ }│{4:~ }|
{4:~ }│{4:~ }|*2
|
]])
end)

View File

@ -38,10 +38,7 @@ local function test_embed(ext_linegrid)
it('can display errors', function()
startup('--cmd', 'echoerr invalid+')
screen:expect([[
|
|
|
|
|*4
{6: }|
{7:Error detected while processing pre-vimrc command line:} |
{7:E121: Undefined variable: invalid} |
@ -51,12 +48,7 @@ local function test_embed(ext_linegrid)
feed('<cr>')
screen:expect([[
^ |
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|*6
|
]])
end)
@ -67,9 +59,7 @@ local function test_embed(ext_linegrid)
end
startup('--cmd', 'echoerr "foo"', '--cmd', 'color default', '--cmd', 'echoerr "bar"')
screen:expect([[
|
|
|
|*3
{9: }|
{7:Error detected while processing pre-vimrc command line:} |
{7:foo} |
@ -81,9 +71,7 @@ local function test_embed(ext_linegrid)
it("doesn't erase output when setting Normal colors", function()
startup('--cmd', 'echoerr "foo"', '--cmd', 'hi Normal guibg=Green', '--cmd', 'echoerr "bar"')
screen:expect{grid=[[
|
|
|
|*3
{6: }|
{7:Error detected while processing pre-vimrc command line:} |
{7:foo} |
@ -122,11 +110,7 @@ describe('--embed UI', function()
screen:expect{grid=[[
^hello nvim |
from external input |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]]}
@ -136,10 +120,7 @@ describe('--embed UI', function()
hello nvim |
^ |
from external input |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
{2:-- INSERT --} |
]]}
end)
@ -208,9 +189,7 @@ describe('--embed --listen UI', function()
child_screen:attach(nil, child_session)
child_screen:expect{grid=[[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
{2:[No Name] 0,0-1 All}|
|
]], attr_ids={

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -36,11 +36,7 @@ describe('ext_hlstate detailed highlights', function()
screen:expect([[
these are {1:some} lines |
^wi{2:th }{4:co}{3:lorful text} |
{5:~ }|
{5:~ }|
{5:~ }|
{5:~ }|
{5:~ }|
{5:~ }|*5
{8:search hit BOTTOM, continuing at TOP}{7: }|
]], {
[1] = {{foreground = Screen.colors.Magenta},
@ -77,11 +73,7 @@ describe('ext_hlstate detailed highlights', function()
screen:expect([[
^ {1:│} |
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|*5
{3:[No Name] }{4:[No Name] }|
{7: }|
]])
@ -89,11 +81,7 @@ describe('ext_hlstate detailed highlights', function()
command("hi clear StatusLine | hi clear StatuslineNC")
screen:expect([[
^ {1:│} |
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|*5
{5:[No Name] }{6:[No Name] }|
{7: }|
]])
@ -102,11 +90,7 @@ describe('ext_hlstate detailed highlights', function()
command("wincmd w")
screen:expect([[
{1:│}^ |
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|*5
{6:[No Name] }{5:[No Name] }|
{7: }|
]])
@ -136,8 +120,7 @@ describe('ext_hlstate detailed highlights', function()
-- NormalNC is not applied if not set, to avoid spurious redraws
screen:expect([[
{1: 1 }^ |
{2:~ }|
{2:~ }|
{2:~ }|*2
{3:[No Name] }|
{1: 1 } |
{2:~ }|
@ -148,8 +131,7 @@ describe('ext_hlstate detailed highlights', function()
command("set winhl=LineNr:ErrorMsg")
screen:expect{grid=[[
{13: 1 }^ |
{14:~ }|
{14:~ }|
{14:~ }|*2
{3:[No Name] }|
{1: 1 } |
{2:~ }|
@ -160,8 +142,7 @@ describe('ext_hlstate detailed highlights', function()
command("set winhl=Normal:MsgSeparator,NormalNC:Statement")
screen:expect([[
{7: 1 }{6:^ }|
{8:~ }|
{8:~ }|
{8:~ }|*2
{3:[No Name] }|
{1: 1 } |
{2:~ }|
@ -172,8 +153,7 @@ describe('ext_hlstate detailed highlights', function()
command("wincmd w")
screen:expect([[
{10: 1 }{9: }|
{11:~ }|
{11:~ }|
{11:~ }|*2
{4:[No Name] }|
{1: 1 }^ |
{2:~ }|
@ -198,11 +178,7 @@ describe('ext_hlstate detailed highlights', function()
screen:expect([[
^tty ready |
{1: } |
|
|
|
|
|
|*5
{7: }|
]])
@ -217,10 +193,7 @@ describe('ext_hlstate detailed highlights', function()
^tty ready |
x {5:y z} |
{1: } |
|
|
|
|
|*4
{7: }|
]])
else
@ -228,10 +201,7 @@ describe('ext_hlstate detailed highlights', function()
^tty ready |
x {2:y }{3:z} |
{1: } |
|
|
|
|
|*4
{7: }|
]])
end
@ -242,22 +212,14 @@ describe('ext_hlstate detailed highlights', function()
screen:expect([[
^tty ready |
x {6:y}{5: z} |
|
|
|
|
|
|*5
{7: }|
]])
else
screen:expect([[
^tty ready |
x {4:y}{2: }{3:z} |
|
|
|
|
|
|*5
{7: }|
]])
end
@ -274,24 +236,14 @@ describe('ext_hlstate detailed highlights', function()
})
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
{3: }|
]])
command("hi NonText guifg=Red gui=reverse ctermfg=Green cterm=italic")
screen:expect([[
^ |
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|*6
{3: }|
]])

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More