aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/terminal/altscreen_spec.lua12
-rw-r--r--test/functional/terminal/buffer_spec.lua46
-rw-r--r--test/functional/terminal/cursor_spec.lua30
-rw-r--r--test/functional/terminal/helpers.lua17
-rw-r--r--test/functional/terminal/highlight_spec.lua55
-rw-r--r--test/functional/terminal/mouse_spec.lua86
-rw-r--r--test/functional/terminal/scrollback_spec.lua28
-rw-r--r--test/functional/terminal/tui_spec.lua190
-rw-r--r--test/functional/terminal/window_spec.lua4
-rw-r--r--test/functional/terminal/window_split_tab_spec.lua12
-rw-r--r--test/functional/ui/output_spec.lua22
11 files changed, 247 insertions, 255 deletions
diff --git a/test/functional/terminal/altscreen_spec.lua b/test/functional/terminal/altscreen_spec.lua
index e1760c8ad8..9553ffac43 100644
--- a/test/functional/terminal/altscreen_spec.lua
+++ b/test/functional/terminal/altscreen_spec.lua
@@ -21,7 +21,7 @@ describe('terminal altscreen', function()
line7 |
line8 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
enter_altscreen()
screen:expect([[
@@ -31,7 +31,7 @@ describe('terminal altscreen', function()
|
|
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
eq(10, curbuf('line_count'))
end)
@@ -60,7 +60,7 @@ describe('terminal altscreen', function()
line7 |
line8 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('<c-\\><c-n>gg')
screen:expect([[
@@ -86,7 +86,7 @@ describe('terminal altscreen', function()
line15 |
line16 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -116,7 +116,7 @@ describe('terminal altscreen', function()
|
rows: 4, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end
@@ -149,7 +149,7 @@ describe('terminal altscreen', function()
line5 |
line6 |
line7 |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index 8a535d6864..1923e2c675 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -21,11 +21,11 @@ describe('terminal buffer', function()
feed('<c-\\><c-n>:set bufhidden=wipe<cr>:enew<cr>')
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
- ~ |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
:enew |
]])
end)
@@ -34,11 +34,11 @@ describe('terminal buffer', function()
feed(':bnext:l<esc>')
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
- ~ |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
|
]])
end)
@@ -78,7 +78,7 @@ describe('terminal buffer', function()
|
|
^ |
- E21: Cannot make changes, 'modifiable' is off |
+ {8:E21: Cannot make changes, 'modifiable' is off} |
]])
end)
@@ -138,21 +138,21 @@ describe('terminal buffer', function()
feed('<c-\\><c-n>:bd!<cr>')
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
- ~ |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
:bd! |
]])
execute('bnext')
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
- ~ |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
:bnext |
]])
end)
@@ -180,8 +180,8 @@ describe('terminal buffer', function()
-- We should be in a new buffer now.
screen:expect([[
ab^c |
- ~ |
- ========== |
+ {4:~ }|
+ {5:========== }|
rows: 2, cols: 50 |
{2: } |
{1:========== }|
diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua
index 461ddd0ec7..1557868473 100644
--- a/test/functional/terminal/cursor_spec.lua
+++ b/test/functional/terminal/cursor_spec.lua
@@ -25,7 +25,7 @@ describe('terminal cursor', function()
|
|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -49,12 +49,12 @@ describe('terminal cursor', function()
it('is positioned correctly when unfocused', function()
screen:expect([[
- 1 tty ready |
- 2 {2: } |
- 3 |
- 4 |
- 5 |
- 6 ^ |
+ {7: 1 }tty ready |
+ {7: 2 }{2: } |
+ {7: 3 } |
+ {7: 4 } |
+ {7: 5 } |
+ {7: 6 }^ |
:set number |
]])
end)
@@ -83,7 +83,7 @@ describe('terminal cursor', function()
|
|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
show_cursor()
screen:expect([[
@@ -93,7 +93,7 @@ describe('terminal cursor', function()
|
|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
-- same for when the terminal is unfocused
feed('<c-\\><c-n>')
@@ -132,14 +132,8 @@ describe('cursor with customized highlighting', function()
screen = Screen.new(50, 7)
screen:set_default_attr_ids({
[1] = {foreground = 45, background = 46},
- [2] = {foreground = 55, background = 56}
- })
- screen:set_default_attr_ignore({
- [1] = {bold = true},
- [2] = {foreground = 12},
- [3] = {bold = true, reverse = true},
- [5] = {background = 11},
- [6] = {foreground = 130},
+ [2] = {foreground = 55, background = 56},
+ [3] = {bold = true},
})
screen:attach(false)
execute('call termopen(["'..nvim_dir..'/tty-test"]) | startinsert')
@@ -153,7 +147,7 @@ describe('cursor with customized highlighting', function()
|
|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('<c-\\><c-n>')
screen:expect([[
diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua
index 3d1530bd90..1b8893c988 100644
--- a/test/functional/terminal/helpers.lua
+++ b/test/functional/terminal/helpers.lua
@@ -44,14 +44,13 @@ local function screen_setup(extra_height, command)
screen:set_default_attr_ids({
[1] = {reverse = true}, -- focused cursor
[2] = {background = 11}, -- unfocused cursor
- })
- screen:set_default_attr_ignore({
- [1] = {bold = true},
- [2] = {foreground = 12},
- [3] = {bold = true, reverse = true},
- [5] = {background = 11},
- [6] = {foreground = 130},
- [7] = {foreground = 15, background = 1}, -- error message
+ [3] = {bold = true},
+ [4] = {foreground = 12},
+ [5] = {bold = true, reverse = true},
+ [6] = {background = 11},
+ [7] = {foreground = 130},
+ [8] = {foreground = 15, background = 1}, -- error message
+ [9] = {foreground = 4},
})
screen:attach(false)
@@ -76,7 +75,7 @@ local function screen_setup(extra_height, command)
table.insert(expected, empty_line)
end
- table.insert(expected, '-- TERMINAL -- ')
+ table.insert(expected, '{3:-- TERMINAL --} ')
screen:expect(table.concat(expected, '\n'))
else
wait()
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua
index 8d7c7451d3..95fbf2c871 100644
--- a/test/functional/terminal/highlight_spec.lua
+++ b/test/functional/terminal/highlight_spec.lua
@@ -16,33 +16,32 @@ describe('terminal window highlighting', function()
[1] = {foreground = 45},
[2] = {background = 46},
[3] = {foreground = 45, background = 46},
- [4] = {bold = true, italic = true, underline = true}
- })
- screen:set_default_attr_ignore({
- [1] = {bold = true},
- [2] = {foreground = 12},
- [3] = {bold = true, reverse = true},
- [5] = {background = 11},
- [6] = {foreground = 130},
- [7] = {reverse = true},
+ [4] = {bold = true, italic = true, underline = true},
+ [5] = {bold = true},
+ [6] = {foreground = 12},
+ [7] = {bold = true, reverse = true},
[8] = {background = 11},
+ [9] = {foreground = 130},
+ [10] = {reverse = true},
+ [11] = {background = 11},
})
screen:attach(false)
execute('enew | call termopen(["'..nvim_dir..'/tty-test"]) | startinsert')
screen:expect([[
tty ready |
+ {10: } |
|
|
|
|
- |
- -- TERMINAL -- |
+ {5:-- TERMINAL --} |
]])
end)
local function descr(title, attr_num, set_attrs_fn)
local function sub(s)
- return s:gsub('NUM', attr_num)
+ local str = s:gsub('NUM', attr_num)
+ return str
end
describe(title, function()
@@ -54,16 +53,15 @@ describe('terminal window highlighting', function()
end)
local function pass_attrs()
- local s = sub([[
+ screen:expect(sub([[
tty ready |
- {NUM:text}text |
+ {NUM:text}text{10: } |
|
|
|
|
- -- TERMINAL -- |
- ]])
- screen:expect(s)
+ {5:-- TERMINAL --} |
+ ]]))
end
it('will pass the corresponding attributes', pass_attrs)
@@ -82,11 +80,11 @@ describe('terminal window highlighting', function()
line6 |
line7 |
line8 |
- |
- -- TERMINAL -- |
+ {10: } |
+ {5:-- TERMINAL --} |
]])
feed('<c-\\><c-n>gg')
- local s = sub([[
+ screen:expect(sub([[
^tty ready |
{NUM:text}textline1 |
line2 |
@@ -94,8 +92,7 @@ describe('terminal window highlighting', function()
line4 |
line5 |
|
- ]])
- screen:expect(s)
+ ]]))
end)
end)
end
@@ -121,28 +118,26 @@ describe('terminal window highlighting with custom palette', function()
clear()
screen = Screen.new(50, 7)
screen:set_default_attr_ids({
- [1] = {foreground = 1193046, special = Screen.colors.Black}
- })
- screen:set_default_attr_ignore({
- [1] = {bold = true},
+ [1] = {foreground = 1193046, special = Screen.colors.Black},
[2] = {foreground = 12},
[3] = {bold = true, reverse = true},
[5] = {background = 11},
[6] = {foreground = 130},
[7] = {reverse = true},
[8] = {background = 11},
+ [9] = {bold = true},
})
screen:attach(true)
nvim('set_var', 'terminal_color_3', '#123456')
execute('enew | call termopen(["'..nvim_dir..'/tty-test"]) | startinsert')
screen:expect([[
tty ready |
+ {7: } |
|
|
|
|
- |
- -- TERMINAL -- |
+ {9:-- TERMINAL --} |
]])
end)
@@ -153,12 +148,12 @@ describe('terminal window highlighting with custom palette', function()
thelpers.feed_data('text')
screen:expect([[
tty ready |
- {1:text}text |
+ {1:text}text{7: } |
|
|
|
|
- -- TERMINAL -- |
+ {9:-- TERMINAL --} |
]])
end)
end)
diff --git a/test/functional/terminal/mouse_spec.lua b/test/functional/terminal/mouse_spec.lua
index a86615184d..715f071708 100644
--- a/test/functional/terminal/mouse_spec.lua
+++ b/test/functional/terminal/mouse_spec.lua
@@ -27,7 +27,7 @@ describe('terminal mouse', function()
line29 |
line30 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -74,7 +74,7 @@ describe('terminal mouse', function()
line30 |
mouse enabled |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -87,7 +87,7 @@ describe('terminal mouse', function()
line30 |
mouse enabled |
"#{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -100,7 +100,7 @@ describe('terminal mouse', function()
line30 |
mouse enabled |
`!!{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)
@@ -119,79 +119,79 @@ describe('terminal mouse', function()
]])
feed(':enew | set number<cr>')
screen:expect([[
- 1 ^ |line28 |
- ~ |line29 |
- ~ |line30 |
- ~ |rows: 5, cols: 25 |
- ~ |{2: } |
+ {7: 1 }^ |line28 |
+ {4:~ }|line29 |
+ {4:~ }|line30 |
+ {4:~ }|rows: 5, cols: 25 |
+ {4:~ }|{2: } |
========== ========== |
:enew | set number |
]])
feed('30iline\n<esc>')
screen:expect([[
- 27 line |line28 |
- 28 line |line29 |
- 29 line |line30 |
- 30 line |rows: 5, cols: 25 |
- 31 ^ |{2: } |
+ {7: 27 }line |line28 |
+ {7: 28 }line |line29 |
+ {7: 29 }line |line30 |
+ {7: 30 }line |rows: 5, cols: 25 |
+ {7: 31 }^ |{2: } |
========== ========== |
|
]])
feed('<c-w>li')
screen:expect([[
- 27 line |line29 |
- 28 line |line30 |
- 29 line |rows: 5, cols: 25 |
- 30 line |rows: 5, cols: 24 |
- 31 |{1: } |
+ {7: 27 }line |line29 |
+ {7: 28 }line |line30 |
+ {7: 29 }line |rows: 5, cols: 25 |
+ {7: 30 }line |rows: 5, cols: 24 |
+ {7: 31 } |{1: } |
========== ========== |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
-- enabling mouse won't affect interaction with other windows
thelpers.enable_mouse()
thelpers.feed_data('mouse enabled\n')
screen:expect([[
- 27 line |line30 |
- 28 line |rows: 5, cols: 25 |
- 29 line |rows: 5, cols: 24 |
- 30 line |mouse enabled |
- 31 |{1: } |
+ {7: 27 }line |line30 |
+ {7: 28 }line |rows: 5, cols: 25 |
+ {7: 29 }line |rows: 5, cols: 24 |
+ {7: 30 }line |mouse enabled |
+ {7: 31 } |{1: } |
========== ========== |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
it('wont lose focus if another window is scrolled', function()
feed('<MouseDown><0,0><MouseDown><0,0>')
screen:expect([[
- 21 line |line30 |
- 22 line |rows: 5, cols: 25 |
- 23 line |rows: 5, cols: 24 |
- 24 line |mouse enabled |
- 25 line |{1: } |
+ {7: 21 }line |line30 |
+ {7: 22 }line |rows: 5, cols: 25 |
+ {7: 23 }line |rows: 5, cols: 24 |
+ {7: 24 }line |mouse enabled |
+ {7: 25 }line |{1: } |
========== ========== |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('<S-MouseUp><0,0>')
screen:expect([[
- 26 line |line30 |
- 27 line |rows: 5, cols: 25 |
- 28 line |rows: 5, cols: 24 |
- 29 line |mouse enabled |
- 30 line |{1: } |
+ {7: 26 }line |line30 |
+ {7: 27 }line |rows: 5, cols: 25 |
+ {7: 28 }line |rows: 5, cols: 24 |
+ {7: 29 }line |mouse enabled |
+ {7: 30 }line |{1: } |
========== ========== |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
it('will lose focus if another window is clicked', function()
feed('<LeftMouse><5,1>')
screen:expect([[
- 27 line |line30 |
- 28 l^ine |rows: 5, cols: 25 |
- 29 line |rows: 5, cols: 24 |
- 30 line |mouse enabled |
- 31 |{2: } |
+ {7: 27 }line |line30 |
+ {7: 28 }l^ine |rows: 5, cols: 25 |
+ {7: 29 }line |rows: 5, cols: 24 |
+ {7: 30 }line |mouse enabled |
+ {7: 31 } |{2: } |
========== ========== |
|
]])
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua
index 7914e30a44..4790419bc8 100644
--- a/test/functional/terminal/scrollback_spec.lua
+++ b/test/functional/terminal/scrollback_spec.lua
@@ -33,7 +33,7 @@ describe('terminal scrollback', function()
line29 |
line30 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -61,7 +61,7 @@ describe('terminal scrollback', function()
line3 |
line4 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -76,7 +76,7 @@ describe('terminal scrollback', function()
line4 |
line5 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
eq(7, curbuf('line_count'))
end)
@@ -92,7 +92,7 @@ describe('terminal scrollback', function()
line6 |
line7 |
line8{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('<c-\\><c-n>6k')
@@ -141,7 +141,7 @@ describe('terminal scrollback', function()
line4 |
rows: 5, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end
@@ -158,7 +158,7 @@ describe('terminal scrollback', function()
rows: 5, cols: 50 |
rows: 3, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
eq(8, curbuf('line_count'))
feed('<c-\\><c-n>3k')
@@ -185,7 +185,7 @@ describe('terminal scrollback', function()
rows: 4, cols: 50 |
{1: } |
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
eq(4, curbuf('line_count'))
end
@@ -203,7 +203,7 @@ describe('terminal scrollback', function()
rows: 4, cols: 50 |
rows: 3, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
eq(4, curbuf('line_count'))
feed('<c-\\><c-n>gg')
@@ -218,7 +218,7 @@ describe('terminal scrollback', function()
rows: 4, cols: 50 |
rows: 3, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)
@@ -235,14 +235,14 @@ describe('terminal scrollback', function()
line3 |
line4 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
screen:try_resize(screen._width, screen._height - 3)
screen:expect([[
line4 |
rows: 3, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
eq(7, curbuf('line_count'))
end)
@@ -255,7 +255,7 @@ describe('terminal scrollback', function()
rows: 3, cols: 50 |
rows: 4, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end
@@ -277,7 +277,7 @@ describe('terminal scrollback', function()
rows: 4, cols: 50 |
rows: 7, cols: 50 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
eq(9, curbuf('line_count'))
feed('<c-\\><c-n>gg')
@@ -315,7 +315,7 @@ describe('terminal scrollback', function()
rows: 11, cols: 50 |
{1: } |
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
-- since there's an empty line after the cursor, the buffer line
-- count equals the terminal screen height
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index e6586c7892..0f7bf7ba9a 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -17,12 +17,12 @@ describe('tui', function()
screen.timeout = 60000
screen:expect([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -36,20 +36,20 @@ describe('tui', function()
abc |
test1 |
test2{1: } |
- ~ |
- [No Name] [+] |
- -- INSERT -- |
- -- TERMINAL -- |
+ {4:~ }|
+ {5:[No Name] [+] }|
+ {3:-- INSERT --} |
+ {3:-- TERMINAL --} |
]])
feed('\027')
screen:expect([[
abc |
test1 |
test{1:2} |
- ~ |
- [No Name] [+] |
+ {4:~ }|
+ {5:[No Name] [+] }|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -64,9 +64,9 @@ describe('tui', function()
alt-k |
alt-l |
{1: } |
- [No Name] [+] |
+ {5:[No Name] [+] }|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('gg')
screen:expect([[
@@ -74,9 +74,9 @@ describe('tui', function()
alt-f |
alt-g |
alt-h |
- [No Name] [+] |
+ {5:[No Name] [+] }|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -90,12 +90,12 @@ describe('tui', function()
feed('i\027j')
screen:expect([[
j{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] [+] |
- -- INSERT -- |
- -- TERMINAL -- |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] [+] }|
+ {3:-- INSERT --} |
+ {3:-- TERMINAL --} |
]])
end)
@@ -105,46 +105,46 @@ describe('tui', function()
feed('\022\022') -- ctrl+v
feed('\022\013') -- ctrl+m
screen:expect([[
- {3:^G^V^M}{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] [+] |
- -- INSERT -- |
- -- TERMINAL -- |
- ]], {[1] = {reverse = true}, [2] = {background = 11}, [3] = {foreground = 4}})
+ {9:^G^V^M}{1: } |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] [+] }|
+ {3:-- INSERT --} |
+ {3:-- TERMINAL --} |
+ ]])
end)
it('automatically sends <Paste> for bracketed paste sequences', function()
feed('i\027[200~')
screen:expect([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
- -- INSERT (paste) -- |
- -- TERMINAL -- |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
+ {3:-- INSERT (paste) --} |
+ {3:-- TERMINAL --} |
]])
feed('pasted from terminal')
screen:expect([[
pasted from terminal{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] [+] |
- -- INSERT (paste) -- |
- -- TERMINAL -- |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] [+] }|
+ {3:-- INSERT (paste) --} |
+ {3:-- TERMINAL --} |
]])
feed('\027[201~')
screen:expect([[
pasted from terminal{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] [+] |
- -- INSERT -- |
- -- TERMINAL -- |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] [+] }|
+ {3:-- INSERT --} |
+ {3:-- TERMINAL --} |
]])
end)
@@ -160,9 +160,9 @@ describe('tui', function()
item 2998 |
item 2999 |
item 3000{1: } |
- [No Name] [+] 3000,10 Bot|
- -- INSERT -- |
- -- TERMINAL -- |
+ {5:[No Name] [+] 3000,10 Bot}|
+ {3:-- INSERT --} |
+ {3:-- TERMINAL --} |
]])
end)
end)
@@ -176,17 +176,15 @@ describe('tui with non-tty file descriptors', function()
it('can handle pipes as stdout and stderr', function()
local screen = thelpers.screen_setup(0, '"'..helpers.nvim_prog..' -u NONE -i NONE --cmd \'set noswapfile\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF"')
- screen:set_default_attr_ids({})
- screen:set_default_attr_ignore(true)
feed(':w testF\n:q\n')
screen:expect([[
:w testF |
:q |
abc |
|
- [Process exited 0] |
+ [Process exited 0]{1: } |
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)
@@ -205,23 +203,23 @@ describe('tui focus event handling', function()
feed('\027[I')
screen:expect([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
gained |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('\027[O')
screen:expect([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
lost |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -231,22 +229,22 @@ describe('tui focus event handling', function()
feed('\027[I')
screen:expect([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
gained |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('\027[O')
screen:expect([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
lost |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -255,22 +253,22 @@ describe('tui focus event handling', function()
feed('\027[I')
screen:expect([[
|
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
g{1:a}ined |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('\027[O')
screen:expect([[
|
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
l{1:o}st |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -287,7 +285,7 @@ describe('tui focus event handling', function()
|
|
gained |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
feed('\027[O')
screen:expect([[
@@ -297,7 +295,7 @@ describe('tui focus event handling', function()
|
|
lost |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)
@@ -319,15 +317,21 @@ describe("tui 't_Co' (terminal colors)", function()
helpers.nvim_prog))
thelpers.feed_data(":echo &t_Co\n")
+ local tline
+ if maxcolors == 8 then
+ tline = "~ "
+ else
+ tline = "{4:~ }"
+ end
screen:expect(string.format([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
+ %s|
+ %s|
+ %s|
+ {5:[No Name] }|
%-3s |
- -- TERMINAL -- |
- ]], tostring(maxcolors and maxcolors or "")))
+ {3:-- TERMINAL --} |
+ ]], tline, tline, tline, tostring(maxcolors and maxcolors or "")))
end
it("unknown TERM sets empty 't_Co'", function()
diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua
index eec8b53f4d..96489045e4 100644
--- a/test/functional/terminal/window_spec.lua
+++ b/test/functional/terminal/window_spec.lua
@@ -52,7 +52,7 @@ describe('terminal window', function()
|
|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)
@@ -68,7 +68,7 @@ describe('terminal window', function()
line3 |
line4 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua
index 644060103a..f4de5f7fca 100644
--- a/test/functional/terminal/window_split_tab_spec.lua
+++ b/test/functional/terminal/window_split_tab_spec.lua
@@ -32,8 +32,8 @@ describe('terminal', function()
tty ready |
rows: 2, cols: 50 |
{2: } |
- ~ |
- ~ |
+ {4:~ }|
+ {4:~ }|
========== |
|
]])
@@ -58,8 +58,8 @@ describe('terminal', function()
rows: 5, cols: 50 |
rows: 2, cols: 50 |
{2: } |
- ~ |
- ~ |
+ {4:~ }|
+ {4:~ }|
========== |
:wincmd p |
]])
@@ -83,7 +83,7 @@ describe('terminal', function()
|
|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
screen:try_resize(screen._width - 6, screen._height - 10)
screen:expect([[
@@ -91,7 +91,7 @@ describe('terminal', function()
rows: 14, cols: 53 |
rows: 4, cols: 47 |
{1: } |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)
diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua
index c7c8986527..22ffc156ef 100644
--- a/test/functional/ui/output_spec.lua
+++ b/test/functional/ui/output_spec.lua
@@ -9,12 +9,12 @@ describe("shell command :!", function()
'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile"]')
screen:expect([[
{1: } |
- ~ |
- ~ |
- ~ |
- [No Name] |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
|
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
@@ -27,13 +27,13 @@ describe("shell command :!", function()
-- to avoid triggering a UI flush.
child_session.feed_data(":!printf foo; sleep 200\n")
screen:expect([[
- ~ |
- ~ |
- [No Name] |
- :!printf foo; sleep 200 |
+ {1: } |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] }|
|
- foo |
- -- TERMINAL -- |
+ {3:-- TERMINAL --} |
]])
end)
end)