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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -49,8 +49,7 @@ describe('startup', function()
funcs.termopen({ nvim_prog, '-u', 'NONE', '--server', eval('v:servername'), '--remote-ui' }) funcs.termopen({ nvim_prog, '-u', 'NONE', '--server', eval('v:servername'), '--remote-ui' })
screen:expect([[ screen:expect([[
^Cannot attach UI of :terminal child to its parent. (Unset $NVIM to skip this check) | ^Cannot attach UI of :terminal child to its parent. (Unset $NVIM to skip this check) |
| |*2
|
]]) ]])
end) end)
@@ -92,12 +91,9 @@ describe('startup', function()
funcs.chansend(id, 'cont\n') funcs.chansend(id, 'cont\n')
screen:expect([[ screen:expect([[
^ | ^ |
~ | ~ |*3
~ |
~ |
[No Name] | [No Name] |
| |*2
|
]]) ]])
end) end)
end) end)
@@ -497,11 +493,9 @@ describe('startup', function()
funcs.chansend(id, '\n') funcs.chansend(id, '\n')
screen:expect([[ screen:expect([[
^ | ^ |
~ | ~ |*2
~ |
[No Name] | [No Name] |
| |*2
|
]]) ]])
end) end)
@@ -907,10 +901,7 @@ describe('user config init', function()
feed('ia') feed('ia')
screen:expect([[ screen:expect([[
| |
~ | ~ |*4
~ |
~ |
~ |
[No Name] 0,0-1 All| [No Name] 0,0-1 All|
| |
-- TERMINAL -- | -- TERMINAL -- |
@@ -918,10 +909,7 @@ describe('user config init', function()
feed(':echo g:exrc_file<CR>') feed(':echo g:exrc_file<CR>')
screen:expect(string.format([[ screen:expect(string.format([[
| |
~ | ~ |*4
~ |
~ |
~ |
[No Name] 0,0-1 All| [No Name] 0,0-1 All|
%s%s| %s%s|
-- TERMINAL -- | -- TERMINAL -- |

View File

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

View File

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

View File

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

View File

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

View File

@@ -116,10 +116,7 @@ describe('tabpage', function()
screen:expect([[ screen:expect([[
{4: [No Name] }{3: [No Name] }{2: }{4:X}| {4: [No Name] }{3: [No Name] }{2: }{4:X}|
^ | ^ |
{0:~ }| {0:~ }|*4
{0:~ }|
{0:~ }|
{0:~ }|
{1:[No Name] }| {1:[No Name] }|
"[No Name]" --No lines in buffer-- | "[No Name]" --No lines in buffer-- |
]]) ]])
@@ -127,10 +124,7 @@ describe('tabpage', function()
screen:expect([[ screen:expect([[
{4: [No Name] }{3: }{5:2}{3: [No Name] }{2: }{4:X}| {4: [No Name] }{3: }{5:2}{3: [No Name] }{2: }{4:X}|
^ │ | ^ │ |
{0:~ }│{0:~ }| {0:~ }│{0:~ }|*4
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{0:~ }│{0:~ }|
{1:[No Name] }| {1:[No Name] }|
"[No Name]" --No lines in buffer-- | "[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([[ screen:expect([[
aaaaa | aaaaa |
^bbbbb | ^bbbbb |
{1:~ }| {1:~ }|*5
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
| |
]]) ]])
end) end)
@@ -96,11 +92,7 @@ describe('the first line is redrawn correctly after inserting text in an empty b
screen:expect([[ screen:expect([[
aaaaa | aaaaa |
^bbbbb | ^bbbbb |
{1:~ }| {1:~ }|*5
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
| |
]]) ]])
end) end)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -266,22 +266,7 @@ describe('swapfile detection', function()
feed(':<CR>') feed(':<CR>')
screen:expect([[ screen:expect([[
^ | ^ |
{0:~ }| {0:~ }|*16
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
: | : |
]]) ]])
nvim1:close() nvim1:close()
@@ -303,22 +288,7 @@ describe('swapfile detection', function()
command([[echo 'hello']]) command([[echo 'hello']])
screen:expect([[ screen:expect([[
^ | ^ |
{0:~ }| {0:~ }|*16
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
hello | hello |
]]) ]])
nvim2:close() 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)") command("call matchaddpos('MyGroup1', [[1, 5], [1, 8, 3]], 10, 3)")
screen:expect([[ screen:expect([[
abcd{1:e}fg{1:hij}klmnop^q | abcd{1:e}fg{1:hij}klmnop^q |
{0:~ }| {0:~ }|*3
{0:~ }|
{0:~ }|
| |
]]) ]])
@@ -37,9 +35,7 @@ describe('063: Test for ":match", "matchadd()" and related functions', function(
command("call matchaddpos('MyGroup1', [[1, 4, 2], [1, 9, 2]])") command("call matchaddpos('MyGroup1', [[1, 4, 2], [1, 9, 2]])")
screen:expect([[ screen:expect([[
abc{1:dΣ}ab{1:cd}e^f | abc{1:dΣ}ab{1:cd}e^f |
{0:~ }| {0:~ }|*3
{0:~ }|
{0:~ }|
| |
]]) ]])
end) end)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -117,14 +117,7 @@ describe(':lua command', function()
feed('<cr>') feed('<cr>')
screen:expect{grid=[[ screen:expect{grid=[[
^ | ^ |
{1:~ }| {1:~ }|*8
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
| |
]]} ]]}
eq('E5108: Error executing lua [string ":lua"]:1: fail\nmuch error\nsuch details', remove_trace(eval('v:errmsg'))) 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([[ screen:expect([[
^ | ^ |
{1:~ }| {1:~ }|*8
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
howdy | howdy |
]]) ]])
eq(true, eval("get(g:, 'valid', v:false)")) eq(true, eval("get(g:, 'valid', v:false)"))
@@ -137,14 +130,7 @@ describe('vim.uv', function()
]]) ]])
screen:expect([[ screen:expect([[
sneaky^ | sneaky^ |
{1:~ }| {1:~ }|*8
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{5:-- INSERT --} | {5:-- INSERT --} |
]]) ]])
eq({blocking=false, mode='n'}, exec_lua("return _G.mode")) 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:~ }{2: stuff }{1: }|
{1:~ }{3: steam }{1: }| {1:~ }{3: steam }{1: }|
{1:~ }{3: strange things }{1: }| {1:~ }{3: strange things }{1: }|
{1:~ }| {1:~ }|*3
{1:~ }|
{1:~ }|
{4:-- Omni completion (^O^N^P) }{5:match 1 of 3} | {4:-- Omni completion (^O^N^P) }{5:match 1 of 3} |
]]} ]]}
meths.set_option_value('operatorfunc', 'v:lua.mymod.noisy', {}) meths.set_option_value('operatorfunc', 'v:lua.mymod.noisy', {})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -25,10 +25,7 @@ describe(':terminal cursor', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
testing cursor{1: } | testing cursor{1: } |
| |*4
|
|
|
{3:-- TERMINAL --} | {3:-- TERMINAL --} |
]]) ]])
end) end)
@@ -38,11 +35,7 @@ describe(':terminal cursor', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{2:^ } | {2:^ } |
| |*5
|
|
|
|
]]) ]])
end) end)
@@ -93,21 +86,14 @@ describe(':terminal cursor', function()
hide_cursor() hide_cursor()
screen:expect([[ screen:expect([[
tty ready | tty ready |
| |*5
|
|
|
|
{3:-- TERMINAL --} | {3:-- TERMINAL --} |
]]) ]])
show_cursor() show_cursor()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{1: } | {1: } |
| |*4
|
|
|
{3:-- TERMINAL --} | {3:-- TERMINAL --} |
]]) ]])
-- same for when the terminal is unfocused -- same for when the terminal is unfocused
@@ -116,21 +102,13 @@ describe(':terminal cursor', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
^ | ^ |
| |*5
|
|
|
|
]]) ]])
show_cursor() show_cursor()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{2:^ } | {2:^ } |
| |*5
|
|
|
|
]]) ]])
end) end)
end) end)
@@ -160,21 +138,14 @@ describe('cursor with customized highlighting', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{1: } | {1: } |
| |*4
|
|
|
{3:-- TERMINAL --} | {3:-- TERMINAL --} |
]]) ]])
feed('<c-\\><c-n>') feed('<c-\\><c-n>')
screen:expect([[ screen:expect([[
tty ready | tty ready |
{2:^ } | {2:^ } |
| |*5
|
|
|
|
]]) ]])
end) end)
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_start = function() end
screen._handle_busy_stop = function() end screen._handle_busy_stop = function() end
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::}{17:^ }{16: }| {16::}{17:^ }{16: }|
{3:-- TERMINAL --} | {3:-- TERMINAL --} |
@@ -225,10 +193,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('at the end', function() it('at the end', function()
feed('<C-R>r') feed('<C-R>r')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaaa}{17:^ }{16: }| {16::aaaaaaaa}{17:^ }{16: }|
{3:-- TERMINAL --} | {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)')) eq({6, 9}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaa^a}{1: }{16: }| {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() it('near the end', function()
feed('<C-R>r<C-X><C-X>') feed('<C-R>r<C-X><C-X>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaa}{17:^a}{16:a }| {16::aaaaaa}{17:^a}{16:a }|
{3:-- TERMINAL --} | {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)')) eq({6, 7}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaa^a}{1:a}{16:a }| {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() it('near the start', function()
feed('<C-R>r<C-B><C-O>') feed('<C-R>r<C-B><C-O>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::a}{17:^a}{16:aaaaaa }| {16::a}{17:^a}{16:aaaaaa }|
{3:-- TERMINAL --} | {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)')) eq({6, 2}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^a}{1:a}{16:aaaaaa }| {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() it('at the end', function()
feed('<C-R>r') feed('<C-R>r')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµµµµ}{17:^ }{16: }| {16::µµµµµµµµ}{17:^ }{16: }|
{3:-- TERMINAL --} | {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)')) eq({6, 17}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµµµ^µ}{1: }{16: }| {16::µµµµµµµ^µ}{1: }{16: }|
| |
@@ -331,10 +275,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the end', function() it('near the end', function()
feed('<C-R>r<C-X><C-X>') feed('<C-R>r<C-X><C-X>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµµ}{17:^µ}{16:µ }| {16::µµµµµµ}{17:^µ}{16:µ }|
{3:-- TERMINAL --} | {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)')) eq({6, 13}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µµµµµ^µ}{1:µ}{16:µ }| {16::µµµµµ^µ}{1:µ}{16:µ }|
| |
@@ -356,10 +294,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the start', function() it('near the start', function()
feed('<C-R>r<C-B><C-O>') feed('<C-R>r<C-B><C-O>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ}{17:^µ}{16:µµµµµµ }| {16::µ}{17:^µ}{16:µµµµµµ }|
{3:-- TERMINAL --} | {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)')) eq({6, 3}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^µ}{1:µ}{16:µµµµµµ }| {16::^µ}{1:µ}{16:µµµµµµ }|
| |
@@ -389,10 +321,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('at the end', function() it('at the end', function()
feed('<C-R>r') feed('<C-R>r')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳}{17:^ }{16: }| {16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳}{17:^ }{16: }|
{3:-- TERMINAL --} | {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)')) eq({6, 33}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳}{1: }{16: }| {16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳}{1: }{16: }|
| |
@@ -414,10 +340,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the end', function() it('near the end', function()
feed('<C-R>r<C-X><C-X>') feed('<C-R>r<C-X><C-X>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳µ̳}{17:^µ̳}{16:µ̳ }| {16::µ̳µ̳µ̳µ̳µ̳µ̳}{17:^µ̳}{16:µ̳ }|
{3:-- TERMINAL --} | {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)')) eq({6, 25}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳µ̳µ̳µ̳µ̳^µ̳}{1:µ̳}{16:µ̳ }| {16::µ̳µ̳µ̳µ̳µ̳^µ̳}{1:µ̳}{16:µ̳ }|
| |
@@ -439,10 +359,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the start', function() it('near the start', function()
feed('<C-R>r<C-B><C-O>') feed('<C-R>r<C-B><C-O>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::µ̳}{17:^µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }| {16::µ̳}{17:^µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
{3:-- TERMINAL --} | {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)')) eq({6, 5}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^µ̳}{1:µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }| {16::^µ̳}{1:µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
| |
@@ -472,10 +386,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('at the end', function() it('at the end', function()
feed('<C-R>r') feed('<C-R>r')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦哦哦哦}{17:^ }{16: }| {16::哦哦哦哦哦哦哦哦}{17:^ }{16: }|
{3:-- TERMINAL --} | {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)')) eq({6, 25}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦哦哦^哦}{1: }{16: }| {16::哦哦哦哦哦哦哦^哦}{1: }{16: }|
| |
@@ -497,10 +405,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the end', function() it('near the end', function()
feed('<C-R>r<C-X><C-X>') feed('<C-R>r<C-X><C-X>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦哦}{17:^哦}{16:哦 }| {16::哦哦哦哦哦哦}{17:^哦}{16:哦 }|
{3:-- TERMINAL --} | {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)')) eq({6, 19}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦哦哦哦哦^哦}{1:哦}{16:哦 }| {16::哦哦哦哦哦^哦}{1:哦}{16:哦 }|
| |
@@ -522,10 +424,7 @@ describe('buffer cursor position is correct in terminal without number column',
it('near the start', function() it('near the start', function()
feed('<C-R>r<C-B><C-O>') feed('<C-R>r<C-B><C-O>')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::哦}{17:^哦}{16:哦哦哦哦哦哦 }| {16::哦}{17:^哦}{16:哦哦哦哦哦哦 }|
{3:-- TERMINAL --} | {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)')) eq({6, 4}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::^哦}{1:哦}{16:哦哦哦哦哦哦 }| {16::^哦}{1:哦}{16:哦哦哦哦哦哦 }|
| |
@@ -549,10 +445,7 @@ describe('buffer cursor position is correct in terminal without number column',
setup_ex_register('aaaaaaaa ') setup_ex_register('aaaaaaaa ')
feed('<C-R>r') feed('<C-R>r')
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaaa }{17:^ }{16: }| {16::aaaaaaaa }{17:^ }{16: }|
{3:-- TERMINAL --} | {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)')) eq({6, 13}, eval('nvim_win_get_cursor(0)'))
feed([[<C-\><C-N>]]) feed([[<C-\><C-N>]])
screen:expect([[ screen:expect([[
{16: }| {16: }|*4
{16: }|
{16: }|
{16: }|
{16:Entering Ex mode. Type "visual" to go to Normal mode. }| {16:Entering Ex mode. Type "visual" to go to Normal mode. }|
{16::aaaaaaaa ^ }{1: }{16: }| {16::aaaaaaaa ^ }{1: }{16: }|
| |

View File

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

View File

@@ -37,10 +37,7 @@ describe(':terminal highlight', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{10: } | {10: } |
| |*4
|
|
|
{5:-- TERMINAL --} | {5:-- TERMINAL --} |
]]) ]])
end) end)
@@ -64,10 +61,7 @@ describe(':terminal highlight', function()
screen:expect(sub([[ screen:expect(sub([[
tty ready | tty ready |
{NUM:text}text{10: } | {NUM:text}text{10: } |
| |*4
|
|
|
{5:-- TERMINAL --} | {5:-- TERMINAL --} |
]])) ]]))
end end
@@ -194,10 +188,7 @@ describe(':terminal highlight forwarding', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{1: } | {1: } |
| |*4
|
|
|
{2:-- TERMINAL --} | {2:-- TERMINAL --} |
]]) ]])
end) end)
@@ -213,10 +204,7 @@ describe(':terminal highlight forwarding', function()
screen:expect{grid=[[ screen:expect{grid=[[
tty ready | tty ready |
{3:text}{4:color}text{1: } | {3:text}{4:color}text{1: } |
| |*4
|
|
|
{2:-- TERMINAL --} | {2:-- TERMINAL --} |
]]} ]]}
end) end)
@@ -246,10 +234,7 @@ describe(':terminal highlight with custom palette', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{7: } | {7: } |
| |*4
|
|
|
{9:-- TERMINAL --} | {9:-- TERMINAL --} |
]]) ]])
end) end)
@@ -263,10 +248,7 @@ describe(':terminal highlight with custom palette', function()
screen:expect([[ screen:expect([[
tty ready | tty ready |
{1:text}text{7: } | {1:text}text{7: } |
| |*4
|
|
|
{9:-- TERMINAL --} | {9:-- TERMINAL --} |
]]) ]])
end) 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 -- closes the buffer correctly after pressing a key
screen:expect([[ screen:expect([[
^ | ^ |
~ | ~ |*5
~ |
~ |
~ |
~ |
| |
]]) ]])
end) end)
@@ -614,10 +610,7 @@ describe("pending scrollback line handling", function()
or {'printf', ('hi\n'):rep(12)} or {'printf', ('hi\n'):rep(12)}
) )
screen:expect [[ screen:expect [[
hi | hi |*4
hi |
hi |
hi |
| |
[Process exited 0]{2: } | [Process exited 0]{2: } |
{3:-- TERMINAL --} | {3:-- TERMINAL --} |

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -186,9 +186,7 @@ describe('ui/cursor', function()
command("echo 'test'") command("echo 'test'")
screen:expect{grid=[[ screen:expect{grid=[[
^ | ^ |
~ | ~ |*3
~ |
~ |
test | test |
]], condition=function() ]], condition=function()
eq(nil, screen._mode_info) eq(nil, screen._mode_info)
@@ -255,9 +253,7 @@ describe('ui/cursor', function()
end end
screen:expect{grid=[[ screen:expect{grid=[[
^ | ^ |
~ | ~ |*3
~ |
~ |
test | test |
]], condition=function() ]], condition=function()
eq(expected_mode_info, screen._mode_info) 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: }5 │{1: }5 |
{1: }6 │{1: }6 | {1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -88,12 +83,7 @@ describe('Diff mode screen', function()
{1: }5 │{1: }5 | {1: }5 │{1: }5 |
{1: }6 │{1: }6 | {1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -114,12 +104,7 @@ describe('Diff mode screen', function()
{1: }5 │{1: }5 | {1: }5 │{1: }5 |
{1: }6 │{1: }6 | {1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -134,12 +119,7 @@ describe('Diff mode screen', function()
{1: }5 │{1: }5 | {1: }5 │{1: }5 |
{1: }6 │{1: }6 | {1: }6 │{1: }6 |
{1:+ }{5:+-- 4 lines: 7···}│{1:+ }{5:+-- 4 lines: 7··}| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -160,12 +140,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -180,12 +155,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -219,12 +189,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -239,12 +204,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}| {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -282,8 +242,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}| {1: }{4:11 }│{1: }{2:-----------------}|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*2
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -302,8 +261,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{4:11 }│{1: }{2:-----------------}| {1: }{4:11 }│{1: }{2:-----------------}|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*2
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -328,8 +286,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }| {1: }{2:------------------}│{1: }{4:11 }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*2
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -348,8 +305,7 @@ describe('Diff mode screen', function()
{1: }9 │{1: }9 | {1: }9 │{1: }9 |
{1: }10 │{1: }10 | {1: }10 │{1: }10 |
{1: }{2:------------------}│{1: }{4:11 }| {1: }{2:------------------}│{1: }{4:11 }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*2
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -578,11 +534,7 @@ int main(int argc, char **argv)
{1: }{2:------------------}│{1: }{4: values.each do }| {1: }{2:------------------}│{1: }{4: values.each do }|
{1: } v.finalize │{1: } v.finalize | {1: } v.finalize │{1: } v.finalize |
{1: } end │{1: } end | {1: } end │{1: } end |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*5
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=internal,filler | :set diffopt=internal,filler |
]]) ]])
@@ -601,11 +553,7 @@ int main(int argc, char **argv)
{1: } values.each do |│{1: } values.each do | {1: } values.each do |│{1: } values.each do |
{1: } v.finalize │{1: } v.finalize | {1: } v.finalize │{1: } v.finalize |
{1: } end │{1: } end | {1: } end │{1: } end |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*5
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {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: } values.each do |│{1: } values.each do |
{1: } v.finalize │{1: } v.finalize | {1: } v.finalize │{1: } v.finalize |
{1: } end │{1: } end | {1: } end │{1: } end |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*5
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {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>') feed(':set diffopt=filler<cr>')
screen:expect([[ screen:expect([[
{1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*13
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -664,19 +596,7 @@ int main(int argc, char **argv)
feed(':set diffopt+=internal<cr>') feed(':set diffopt+=internal<cr>')
screen:expect([[ screen:expect([[
{1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}| {1:+ }{5:^+-- 10 lines: 1···}│{1:+ }{5:+-- 10 lines: 1··}|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*13
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -690,19 +610,7 @@ int main(int argc, char **argv)
feed(':set diffopt=filler<cr>') feed(':set diffopt=filler<cr>')
screen:expect([[ screen:expect([[
{1:- }^ │{1:- } | {1:- }^ │{1:- } |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*13
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler | :set diffopt=filler |
]]) ]])
@@ -710,19 +618,7 @@ int main(int argc, char **argv)
feed(':set diffopt+=internal<cr>') feed(':set diffopt+=internal<cr>')
screen:expect([[ screen:expect([[
{1:- }^ │{1:- } | {1:- }^ │{1:- } |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*13
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -738,17 +634,7 @@ int main(int argc, char **argv)
{1: }^a │{1: }A | {1: }^a │{1: }A |
{1: }b │{1: }b | {1: }b │{1: }b |
{1: }{9:cd }│{1: }{9:cD}{8:e}{9: }| {1: }{9:cd }│{1: }{9:cD}{8:e}{9: }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler,icase | :set diffopt=filler,icase |
]]) ]])
@@ -758,17 +644,7 @@ int main(int argc, char **argv)
{1: }^a │{1: }A | {1: }^a │{1: }A |
{1: }b │{1: }b | {1: }b │{1: }b |
{1: }{9:cd }│{1: }{9:cD}{8:e}{9: }| {1: }{9:cd }│{1: }{9:cD}{8:e}{9: }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=internal | :set diffopt+=internal |
]]) ]])
@@ -795,12 +671,7 @@ int main(int argc, char **argv)
{1: } return 0; │{1: } return 0; | {1: } return 0; │{1: } return 0; |
{1: }{2:------------------}│{1: }{4: } }| {1: }{2:------------------}│{1: }{4: } }|
{1: }} │{1: }} | {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler,iwhite | :set diffopt=filler,iwhite |
]]) ]])
@@ -818,12 +689,7 @@ int main(int argc, char **argv)
{1: } return 0; │{1: } return 0; | {1: } return 0; │{1: } return 0; |
{1: }{2:------------------}│{1: }{4: } }| {1: }{2:------------------}│{1: }{4: } }|
{1: }} │{1: }} | {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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=filler,iwhite,internal | :set diffopt=filler,iwhite,internal |
]]) ]])
@@ -842,19 +708,12 @@ int main(int argc, char **argv)
feed(':set diffopt=internal,filler,iblank<cr>') feed(':set diffopt=internal,filler,iblank<cr>')
screen:expect([[ screen:expect([[
{1: }^a │{1: }a | {1: }^a │{1: }a |
{1: }{4: }│{1: }{2:-----------------}| {1: }{4: }│{1: }{2:-----------------}|*2
{1: }{4: }│{1: }{2:-----------------}|
{1: }cd │{1: }cd | {1: }cd │{1: }cd |
{1: }ef │{1: } | {1: }ef │{1: } |
{1: }{8:xxx}{9: }│{1: }ef | {1: }{8:xxx}{9: }│{1: }ef |
{6:~ }│{1: }{8:yyy}{9: }| {6:~ }│{1: }{8:yyy}{9: }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*7
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=internal,filler,iblank | :set diffopt=internal,filler,iblank |
]]) ]])
@@ -871,14 +730,7 @@ int main(int argc, char **argv)
{1: }cd │{1: }ef | {1: }cd │{1: }ef |
{1: }ef │{1: }{8:yyy}{9: }| {1: }ef │{1: }{8:yyy}{9: }|
{1: }{8:xxx}{9: }│{6:~ }| {1: }{8:xxx}{9: }│{6:~ }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*8
{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 }| {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: }cd │{1: }ef |
{1: }ef │{1: }{8:yyy}{9: }| {1: }ef │{1: }{8:yyy}{9: }|
{1: }{8:xxx}{9: }│{6:~ }| {1: }{8:xxx}{9: }│{6:~ }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*8
{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 }| {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: }cd │{1: }ef |
{1: }ef │{1: }{8:yyy}{9: }| {1: }ef │{1: }{8:yyy}{9: }|
{1: }{8:xxx}{9: }│{6:~ }| {1: }{8:xxx}{9: }│{6:~ }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*8
{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 }| {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: }foo │{1: }foo |
{1: }{2:------------------}│{1: }{4: }| {1: }{2:------------------}│{1: }{4: }|
{1: }bar │{1: }bar | {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 }| {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: }foo │{1: }foo |
{1: }{2:------------------}│{1: }{4: }| {1: }{2:------------------}│{1: }{4: }|
{1: }bar │{1: }bar | {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 }| {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: } ui.setupUI(Mai│{1: } ui.setupUI(Ma|
{1: } MainWindow.sho│{1: } MainWindow.sh| {1: } MainWindow.sho│{1: } MainWindow.sh|
{1: } sys.exit(app.e│{1: } sys.exit(app.| {1: } sys.exit(app.e│{1: } sys.exit(app.|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*3
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt=internal,filler | :set diffopt=internal,filler |
]]) ]])
@@ -1137,9 +963,7 @@ int main(int argc, char **argv)
{1: } ui.setupUI(Mai│{1: } ui.setupUI(Ma| {1: } ui.setupUI(Mai│{1: } ui.setupUI(Ma|
{1: } MainWindow.sho│{1: } MainWindow.sh| {1: } MainWindow.sho│{1: } MainWindow.sh|
{1: } ^sys.exit(app.e│{1: } sys.exit(app.| {1: } ^sys.exit(app.e│{1: } sys.exit(app.|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*3
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=linematch:20 | :set diffopt+=linematch:20 |
]]) ]])
@@ -1163,17 +987,7 @@ ccca]]
{1: }^DDD │{1: }DDD | {1: }^DDD │{1: }DDD |
{1: }{2:------------------}│{1: }{4:AAA }| {1: }{2:------------------}│{1: }{4:AAA }|
{1: }{8:_a}{9:a }│{1: }{8:ccc}{9:a }| {1: }{8:_a}{9:a }│{1: }{8:ccc}{9:a }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
| |
]]) ]])
@@ -1182,17 +996,7 @@ ccca]]
{1: }^DDD │{1: }DDD | {1: }^DDD │{1: }DDD |
{1: }{8:_}{9:aa }│{1: }{8:A}{9:AA }| {1: }{8:_}{9:aa }│{1: }{8:A}{9:AA }|
{1: }{2:------------------}│{1: }{4:ccca }| {1: }{2:------------------}│{1: }{4:ccca }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=icase | :set diffopt+=icase |
]]) ]])
@@ -1216,17 +1020,7 @@ AAAB]]
{1: }^BB │{1: }BB | {1: }^BB │{1: }BB |
{1: }{9: AA}{8:A}{9: }│{1: }{9: AA}{8:B}{9: }| {1: }{9: AA}{8:A}{9: }│{1: }{9: AA}{8:B}{9: }|
{1: }{2:------------------}│{1: }{4:AAAB }| {1: }{2:------------------}│{1: }{4:AAAB }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
| |
]]} ]]}
@@ -1235,17 +1029,7 @@ AAAB]]
{1: }^BB │{1: }BB | {1: }^BB │{1: }BB |
{1: }{2:------------------}│{1: }{4: AAB }| {1: }{2:------------------}│{1: }{4: AAB }|
{1: }{9: AAA }│{1: }{9:AAA}{8:B}{9: }| {1: }{9: AAA }│{1: }{9:AAA}{8:B}{9: }|
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{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 }| {7:<onal-diff-screen-1 }{3:<l-diff-screen-1.2 }|
:set diffopt+=iwhiteall | :set diffopt+=iwhiteall |
]]} ]]}
@@ -1267,12 +1051,7 @@ AAAB]]
{6:~ }│{6:~ }| {6:~ }│{6:~ }|
{3:<onal-diff-screen-1 <l-diff-screen-1.2 }| {3:<onal-diff-screen-1 <l-diff-screen-1.2 }|
^ | ^ |
{6:~ }| {6:~ }|*6
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{7:[No Name] }| {7:[No Name] }|
:e | :e |
]]} ]]}
@@ -1287,12 +1066,7 @@ AAAB]]
{6:~ }│{6:~ }| {6:~ }│{6:~ }|
{3:<-diff-screen-1 [+] <l-diff-screen-1.2 }| {3:<-diff-screen-1 [+] <l-diff-screen-1.2 }|
^ | ^ |
{6:~ }| {6:~ }|*6
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{6:~ }|
{7:[No Name] }| {7:[No Name] }|
:e | :e |
]]} ]]}
@@ -1317,8 +1091,7 @@ AAAB]]
ccc | ccc |
| |
xx | xx |
{6:~ }| {6:~ }|*2
{6:~ }|
{7:Xtest-functional-diff-screen-1 }| {7:Xtest-functional-diff-screen-1 }|
:e | :e |
]]} ]]}
@@ -1337,8 +1110,7 @@ AAAB]]
ccc | ccc |
| |
xx | xx |
{6:~ }| {6:~ }|*2
{6:~ }|
{7:Xtest-functional-diff-screen-1 [+] }| {7:Xtest-functional-diff-screen-1 [+] }|
:e | :e |
]]} ]]}
@@ -1387,8 +1159,7 @@ it('win_update redraws lines properly', function()
command("windo 1") command("windo 1")
screen:expect{grid=[[ screen:expect{grid=[[
{13: }{16:-----------------------}│{13: }{15:^1 }| {13: }{16:-----------------------}│{13: }{15:^1 }|
{13: }{16:-----------------------}│{13: }{15: }| {13: }{16:-----------------------}│{13: }{15: }|*2
{13: }{16:-----------------------}│{13: }{15: }|
{13: }2 │{13: }2 | {13: }2 │{13: }2 |
{13: }{17:2}{18:a }│{13: }{17:1}{18:a }| {13: }{17:2}{18:a }│{13: }{17:1}{18:a }|
{13: }{15:2b }│{13: }{16:----------------------}| {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: 1 }a |
{1: }a │{11: 2 }a | {1: }a │{11: 2 }a |
{1: }{8:x}{9: }│{11: 3 }{8:y}{9: }| {1: }{8:x}{9: }│{11: 3 }{8:y}{9: }|
{1: }{4:x }│{11: }{2:----------------}| {1: }{4:x }│{11: }{2:----------------}|*2
{1: }{4:x }│{11: }{2:----------------}|
{1: }b │{11: 4 }b | {1: }b │{11: 4 }b |
{1: }b │{11: 5 }b | {1: }b │{11: 5 }b |
{1: }b │{11: 6 }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 │{10:2 }^a |
{1: }a │{11: 1 }a | {1: }a │{11: 1 }a |
{1: }{8:x}{9: }│{11: 2 }{8:y}{9: }| {1: }{8:x}{9: }│{11: 2 }{8:y}{9: }|
{1: }{4:x }│{11: }{2:----------------}| {1: }{4:x }│{11: }{2:----------------}|*2
{1: }{4:x }│{11: }{2:----------------}|
{1: }b │{11: 3 }b | {1: }b │{11: 3 }b |
{1: }b │{11: 4 }b | {1: }b │{11: 4 }b |
{1: }b │{11: 5 }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 │{11: 1 }a |
{1: }a │{10:3 }^a | {1: }a │{10:3 }^a |
{1: }{8:x}{9: }│{11: 1 }{8:y}{9: }| {1: }{8:x}{9: }│{11: 1 }{8:y}{9: }|
{1: }{4:x }│{11: }{2:----------------}| {1: }{4:x }│{11: }{2:----------------}|*2
{1: }{4:x }│{11: }{2:----------------}|
{1: }b │{11: 2 }b | {1: }b │{11: 2 }b |
{1: }b │{11: 3 }b | {1: }b │{11: 3 }b |
{1: }b │{11: 4 }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: }13 │{1: }13 |
{1: }14 │{1: }14 | {1: }14 │{1: }14 |
{1:- }1^5 │{1:- }15 | {1:- }1^5 │{1:- }15 |
{7:~ }│{7:~ }| {7:~ }│{7:~ }|*8
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{8:[No Name] [+] }{3:[No Name] [+] }| {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: }13 │{1: }13 |
{1: }14 │{1: }14 | {1: }14 │{1: }14 |
{1: }{5:15}{6:^x}{5: }│{1: }{5:15 }| {1: }{5:15}{6:^x}{5: }│{1: }{5:15 }|
{7:~ }│{7:~ }| {7:~ }│{7:~ }|*8
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{8:[No Name] [+] }{3:[No Name] [+] }| {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: }13 │{1: }13 |
{1: }14 │{1: }14 | {1: }14 │{1: }14 |
{1: }{5:15}{6:x}{5: }│{1: }{5:15}{6:^y}{5: }| {1: }{5:15}{6:x}{5: }│{1: }{5:15}{6:^y}{5: }|
{7:~ }│{7:~ }| {7:~ }│{7:~ }|*8
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{7:~ }│{7:~ }|
{3:[No Name] [+] }{8:[No Name] [+] }| {3:[No Name] [+] }{8:[No Name] [+] }|
| |
]]} ]]}
@@ -1594,10 +1341,7 @@ it("diff mode doesn't restore invalid 'foldcolumn' value #21647", function()
command('diffsplit | bd') command('diffsplit | bd')
screen:expect([[ screen:expect([[
^ | ^ |
{0:~ }| {0:~ }|*4
{0:~ }|
{0:~ }|
{0:~ }|
| |
]]) ]])
eq('0', meths.get_option_value('foldcolumn', {})) 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: }{5:E}{4: }│{1: }{5:e}{4: }|
{1: }f │{1: }f | {1: }f │{1: }f |
{1: }g │{1: }g | {1: }g │{1: }g |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{8:[No Name] [+] }{2:[No Name] [+] }| {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: }E │{1: }e |
{1: }f │{1: }f | {1: }f │{1: }f |
{1: }g │{1: }g | {1: }g │{1: }g |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{8:[No Name] [+] }{2:[No Name] [+] }| {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: }{5:E}{4: }│{1: }{5:e}{4: }|
{1: }f │{1: }f | {1: }f │{1: }f |
{1: }g │{1: }g | {1: }g │{1: }g |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{8:[No Name] [+] }{2:[No Name] [+] }| {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: }E │{1: }e |
{1: }f │{1: }f | {1: }f │{1: }f |
{1: }g │{1: }g | {1: }g │{1: }g |
{6:~ }│{6:~ }| {6:~ }│{6:~ }|*11
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{6:~ }│{6:~ }|
{8:[No Name] [+] }{2:[No Name] [+] }| {8:[No Name] [+] }{2:[No Name] [+] }|
| |
]]) ]])
@@ -1751,11 +1455,9 @@ it("diff mode draws 'breakindent' correctly after filler lines", function()
screen:expect([[ screen:expect([[
{1: }a │{1: }a | {1: }a │{1: }a |
{1: }{2:b }│{1: }{3:--------------------}| {1: }{2:b }│{1: }{3:--------------------}|
{1: } cccccccccccccccccc│{1: } cccccccccccccccccc| {1: } cccccccccccccccccc│{1: } cccccccccccccccccc|*2
{1: } cccccccccccccccccc│{1: } cccccccccccccccccc|
{1: } cccccccccccccc │{1: } ccccccccccccc^c | {1: } cccccccccccccc │{1: } ccccccccccccc^c |
{4:~ }│{4:~ }| {4:~ }│{4:~ }|*2
{4:~ }│{4:~ }|
| |
]]) ]])
end) end)

View File

@@ -38,10 +38,7 @@ local function test_embed(ext_linegrid)
it('can display errors', function() it('can display errors', function()
startup('--cmd', 'echoerr invalid+') startup('--cmd', 'echoerr invalid+')
screen:expect([[ screen:expect([[
| |*4
|
|
|
{6: }| {6: }|
{7:Error detected while processing pre-vimrc command line:} | {7:Error detected while processing pre-vimrc command line:} |
{7:E121: Undefined variable: invalid} | {7:E121: Undefined variable: invalid} |
@@ -51,12 +48,7 @@ local function test_embed(ext_linegrid)
feed('<cr>') feed('<cr>')
screen:expect([[ screen:expect([[
^ | ^ |
{3:~ }| {3:~ }|*6
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
{3:~ }|
| |
]]) ]])
end) end)
@@ -67,9 +59,7 @@ local function test_embed(ext_linegrid)
end end
startup('--cmd', 'echoerr "foo"', '--cmd', 'color default', '--cmd', 'echoerr "bar"') startup('--cmd', 'echoerr "foo"', '--cmd', 'color default', '--cmd', 'echoerr "bar"')
screen:expect([[ screen:expect([[
| |*3
|
|
{9: }| {9: }|
{7:Error detected while processing pre-vimrc command line:} | {7:Error detected while processing pre-vimrc command line:} |
{7:foo} | {7:foo} |
@@ -81,9 +71,7 @@ local function test_embed(ext_linegrid)
it("doesn't erase output when setting Normal colors", function() it("doesn't erase output when setting Normal colors", function()
startup('--cmd', 'echoerr "foo"', '--cmd', 'hi Normal guibg=Green', '--cmd', 'echoerr "bar"') startup('--cmd', 'echoerr "foo"', '--cmd', 'hi Normal guibg=Green', '--cmd', 'echoerr "bar"')
screen:expect{grid=[[ screen:expect{grid=[[
| |*3
|
|
{6: }| {6: }|
{7:Error detected while processing pre-vimrc command line:} | {7:Error detected while processing pre-vimrc command line:} |
{7:foo} | {7:foo} |
@@ -122,11 +110,7 @@ describe('--embed UI', function()
screen:expect{grid=[[ screen:expect{grid=[[
^hello nvim | ^hello nvim |
from external input | from external input |
{1:~ }| {1:~ }|*5
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
| |
]]} ]]}
@@ -136,10 +120,7 @@ describe('--embed UI', function()
hello nvim | hello nvim |
^ | ^ |
from external input | from external input |
{1:~ }| {1:~ }|*4
{1:~ }|
{1:~ }|
{1:~ }|
{2:-- INSERT --} | {2:-- INSERT --} |
]]} ]]}
end) end)
@@ -208,9 +189,7 @@ describe('--embed --listen UI', function()
child_screen:attach(nil, child_session) child_screen:attach(nil, child_session)
child_screen:expect{grid=[[ child_screen:expect{grid=[[
^ | ^ |
{1:~ }| {1:~ }|*3
{1:~ }|
{1:~ }|
{2:[No Name] 0,0-1 All}| {2:[No Name] 0,0-1 All}|
| |
]], attr_ids={ ]], 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([[ screen:expect([[
these are {1:some} lines | these are {1:some} lines |
^wi{2:th }{4:co}{3:lorful text} | ^wi{2:th }{4:co}{3:lorful text} |
{5:~ }| {5:~ }|*5
{5:~ }|
{5:~ }|
{5:~ }|
{5:~ }|
{8:search hit BOTTOM, continuing at TOP}{7: }| {8:search hit BOTTOM, continuing at TOP}{7: }|
]], { ]], {
[1] = {{foreground = Screen.colors.Magenta}, [1] = {{foreground = Screen.colors.Magenta},
@@ -77,11 +73,7 @@ describe('ext_hlstate detailed highlights', function()
screen:expect([[ screen:expect([[
^ {1:│} | ^ {1:│} |
{2:~ }{1:│}{2:~ }| {2:~ }{1:│}{2:~ }|*5
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{3:[No Name] }{4:[No Name] }| {3:[No Name] }{4:[No Name] }|
{7: }| {7: }|
]]) ]])
@@ -89,11 +81,7 @@ describe('ext_hlstate detailed highlights', function()
command("hi clear StatusLine | hi clear StatuslineNC") command("hi clear StatusLine | hi clear StatuslineNC")
screen:expect([[ screen:expect([[
^ {1:│} | ^ {1:│} |
{2:~ }{1:│}{2:~ }| {2:~ }{1:│}{2:~ }|*5
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{5:[No Name] }{6:[No Name] }| {5:[No Name] }{6:[No Name] }|
{7: }| {7: }|
]]) ]])
@@ -102,11 +90,7 @@ describe('ext_hlstate detailed highlights', function()
command("wincmd w") command("wincmd w")
screen:expect([[ screen:expect([[
{1:│}^ | {1:│}^ |
{2:~ }{1:│}{2:~ }| {2:~ }{1:│}{2:~ }|*5
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{2:~ }{1:│}{2:~ }|
{6:[No Name] }{5:[No Name] }| {6:[No Name] }{5:[No Name] }|
{7: }| {7: }|
]]) ]])
@@ -136,8 +120,7 @@ describe('ext_hlstate detailed highlights', function()
-- NormalNC is not applied if not set, to avoid spurious redraws -- NormalNC is not applied if not set, to avoid spurious redraws
screen:expect([[ screen:expect([[
{1: 1 }^ | {1: 1 }^ |
{2:~ }| {2:~ }|*2
{2:~ }|
{3:[No Name] }| {3:[No Name] }|
{1: 1 } | {1: 1 } |
{2:~ }| {2:~ }|
@@ -148,8 +131,7 @@ describe('ext_hlstate detailed highlights', function()
command("set winhl=LineNr:ErrorMsg") command("set winhl=LineNr:ErrorMsg")
screen:expect{grid=[[ screen:expect{grid=[[
{13: 1 }^ | {13: 1 }^ |
{14:~ }| {14:~ }|*2
{14:~ }|
{3:[No Name] }| {3:[No Name] }|
{1: 1 } | {1: 1 } |
{2:~ }| {2:~ }|
@@ -160,8 +142,7 @@ describe('ext_hlstate detailed highlights', function()
command("set winhl=Normal:MsgSeparator,NormalNC:Statement") command("set winhl=Normal:MsgSeparator,NormalNC:Statement")
screen:expect([[ screen:expect([[
{7: 1 }{6:^ }| {7: 1 }{6:^ }|
{8:~ }| {8:~ }|*2
{8:~ }|
{3:[No Name] }| {3:[No Name] }|
{1: 1 } | {1: 1 } |
{2:~ }| {2:~ }|
@@ -172,8 +153,7 @@ describe('ext_hlstate detailed highlights', function()
command("wincmd w") command("wincmd w")
screen:expect([[ screen:expect([[
{10: 1 }{9: }| {10: 1 }{9: }|
{11:~ }| {11:~ }|*2
{11:~ }|
{4:[No Name] }| {4:[No Name] }|
{1: 1 }^ | {1: 1 }^ |
{2:~ }| {2:~ }|
@@ -198,11 +178,7 @@ describe('ext_hlstate detailed highlights', function()
screen:expect([[ screen:expect([[
^tty ready | ^tty ready |
{1: } | {1: } |
| |*5
|
|
|
|
{7: }| {7: }|
]]) ]])
@@ -217,10 +193,7 @@ describe('ext_hlstate detailed highlights', function()
^tty ready | ^tty ready |
x {5:y z} | x {5:y z} |
{1: } | {1: } |
| |*4
|
|
|
{7: }| {7: }|
]]) ]])
else else
@@ -228,10 +201,7 @@ describe('ext_hlstate detailed highlights', function()
^tty ready | ^tty ready |
x {2:y }{3:z} | x {2:y }{3:z} |
{1: } | {1: } |
| |*4
|
|
|
{7: }| {7: }|
]]) ]])
end end
@@ -242,22 +212,14 @@ describe('ext_hlstate detailed highlights', function()
screen:expect([[ screen:expect([[
^tty ready | ^tty ready |
x {6:y}{5: z} | x {6:y}{5: z} |
| |*5
|
|
|
|
{7: }| {7: }|
]]) ]])
else else
screen:expect([[ screen:expect([[
^tty ready | ^tty ready |
x {4:y}{2: }{3:z} | x {4:y}{2: }{3:z} |
| |*5
|
|
|
|
{7: }| {7: }|
]]) ]])
end end
@@ -274,24 +236,14 @@ describe('ext_hlstate detailed highlights', function()
}) })
screen:expect([[ screen:expect([[
^ | ^ |
{1:~ }| {1:~ }|*6
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{3: }| {3: }|
]]) ]])
command("hi NonText guifg=Red gui=reverse ctermfg=Green cterm=italic") command("hi NonText guifg=Red gui=reverse ctermfg=Green cterm=italic")
screen:expect([[ screen:expect([[
^ | ^ |
{2:~ }| {2:~ }|*6
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{2:~ }|
{3: }| {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