mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test(terminal/cursor_spec): unskip tests that pass on Windows (#27924)
Also: - Make indent of test cases consistent. - Unskip TUI rapid resize test with ASAN as reflow is now disabled.
This commit is contained in:
parent
400ef8aaa0
commit
d744876723
@ -189,7 +189,7 @@ describe('buffer cursor position is correct in terminal without number column',
|
|||||||
|
|
||||||
before_each(clear)
|
before_each(clear)
|
||||||
|
|
||||||
describe('in a line with no multibyte characters or trailing spaces,', function()
|
describe('in a line with no multibyte chars or trailing spaces,', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
setup_ex_register('aaaaaaaa')
|
setup_ex_register('aaaaaaaa')
|
||||||
end)
|
end)
|
||||||
@ -252,7 +252,7 @@ describe('buffer cursor position is correct in terminal without number column',
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('in a line with single-cell multibyte characters and no trailing spaces,', function()
|
describe('in a line with single-cell multibyte chars and no trailing spaces,', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
setup_ex_register('µµµµµµµµ')
|
setup_ex_register('µµµµµµµµ')
|
||||||
end)
|
end)
|
||||||
@ -315,81 +315,72 @@ describe('buffer cursor position is correct in terminal without number column',
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe(
|
describe('in a line with single-cell composed multibyte chars and no trailing spaces,', function()
|
||||||
'in a line with single-cell composed multibyte characters and no trailing spaces,',
|
before_each(function()
|
||||||
function()
|
setup_ex_register('µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳')
|
||||||
if skip(is_os('win'), 'Encoding problem?') then
|
end)
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
before_each(function()
|
it('at the end', function()
|
||||||
setup_ex_register('µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳')
|
feed('<C-R>r')
|
||||||
end)
|
screen:expect([[
|
||||||
|
|
||||||
it('at the end', function()
|
|
||||||
feed('<C-R>r')
|
|
||||||
screen:expect([[
|
|
||||||
|*4
|
|*4
|
||||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||||
:µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳{2:^ } |
|
:µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳{2:^ } |
|
||||||
{3:-- TERMINAL --} |
|
{3:-- TERMINAL --} |
|
||||||
]])
|
]])
|
||||||
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([[
|
||||||
|*4
|
|*4
|
||||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||||
:µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳{4: } |
|
:µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳{4: } |
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
eq({ 6, 29 }, eval('nvim_win_get_cursor(0)'))
|
eq({ 6, 29 }, eval('nvim_win_get_cursor(0)'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('near the end', function()
|
it('near the end', function()
|
||||||
feed('<C-R>r<C-X><C-X>')
|
skip(is_os('win'))
|
||||||
screen:expect([[
|
feed('<C-R>r<C-X><C-X>')
|
||||||
|
screen:expect([[
|
||||||
|*4
|
|*4
|
||||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||||
:µ̳µ̳µ̳µ̳µ̳µ̳{2:^µ̳}µ̳ |
|
:µ̳µ̳µ̳µ̳µ̳µ̳{2:^µ̳}µ̳ |
|
||||||
{3:-- TERMINAL --} |
|
{3:-- TERMINAL --} |
|
||||||
]])
|
]])
|
||||||
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([[
|
||||||
|*4
|
|*4
|
||||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||||
:µ̳µ̳µ̳µ̳µ̳^µ̳{4:µ̳}µ̳ |
|
:µ̳µ̳µ̳µ̳µ̳^µ̳{4:µ̳}µ̳ |
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
eq({ 6, 21 }, eval('nvim_win_get_cursor(0)'))
|
eq({ 6, 21 }, eval('nvim_win_get_cursor(0)'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('near the start', function()
|
it('near the start', function()
|
||||||
feed('<C-R>r<C-B><C-O>')
|
skip(is_os('win'))
|
||||||
screen:expect([[
|
feed('<C-R>r<C-B><C-O>')
|
||||||
|
screen:expect([[
|
||||||
|*4
|
|*4
|
||||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||||
:µ̳{2:^µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
:µ̳{2:^µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||||
{3:-- TERMINAL --} |
|
{3:-- TERMINAL --} |
|
||||||
]])
|
]])
|
||||||
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([[
|
||||||
|*4
|
|*4
|
||||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||||
:^µ̳{4:µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
:^µ̳{4:µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
eq({ 6, 1 }, eval('nvim_win_get_cursor(0)'))
|
eq({ 6, 1 }, eval('nvim_win_get_cursor(0)'))
|
||||||
end)
|
end)
|
||||||
end
|
end)
|
||||||
)
|
|
||||||
|
|
||||||
describe('in a line with double-cell multibyte characters and no trailing spaces,', function()
|
|
||||||
if skip(is_os('win'), 'Encoding problem?') then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
|
describe('in a line with double-cell multibyte chars and no trailing spaces,', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
setup_ex_register('哦哦哦哦哦哦哦哦')
|
setup_ex_register('哦哦哦哦哦哦哦哦')
|
||||||
end)
|
end)
|
||||||
@ -522,7 +513,7 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
command('set number')
|
command('set number')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('in a line with no multibyte characters or trailing spaces,', function()
|
describe('in a line with no multibyte chars or trailing spaces,', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
setup_ex_register('aaaaaaaa')
|
setup_ex_register('aaaaaaaa')
|
||||||
end)
|
end)
|
||||||
@ -603,7 +594,7 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('in a line with single-cell multibyte characters and no trailing spaces,', function()
|
describe('in a line with single-cell multibyte chars and no trailing spaces,', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
setup_ex_register('µµµµµµµµ')
|
setup_ex_register('µµµµµµµµ')
|
||||||
end)
|
end)
|
||||||
@ -684,20 +675,14 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe(
|
describe('in a line with single-cell composed multibyte chars and no trailing spaces,', function()
|
||||||
'in a line with single-cell composed multibyte characters and no trailing spaces,',
|
before_each(function()
|
||||||
function()
|
setup_ex_register('µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳')
|
||||||
if skip(is_os('win'), 'Encoding problem?') then
|
end)
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
before_each(function()
|
it('at the end', function()
|
||||||
setup_ex_register('µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳')
|
feed('<C-R>r')
|
||||||
end)
|
screen:expect([[
|
||||||
|
|
||||||
it('at the end', function()
|
|
||||||
feed('<C-R>r')
|
|
||||||
screen:expect([[
|
|
||||||
{7: 1 } |
|
{7: 1 } |
|
||||||
{7: 2 } |
|
{7: 2 } |
|
||||||
{7: 3 } |
|
{7: 3 } |
|
||||||
@ -706,9 +691,9 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳{2:^ } |
|
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳{2:^ } |
|
||||||
{3:-- TERMINAL --} |
|
{3:-- TERMINAL --} |
|
||||||
]])
|
]])
|
||||||
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([[
|
||||||
{7: 1 } |
|
{7: 1 } |
|
||||||
{7: 2 } |
|
{7: 2 } |
|
||||||
{7: 3 } |
|
{7: 3 } |
|
||||||
@ -717,12 +702,13 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳{4: } |
|
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳{4: } |
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
eq({ 6, 29 }, eval('nvim_win_get_cursor(0)'))
|
eq({ 6, 29 }, eval('nvim_win_get_cursor(0)'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('near the end', function()
|
it('near the end', function()
|
||||||
feed('<C-R>r<C-X><C-X>')
|
skip(is_os('win'))
|
||||||
screen:expect([[
|
feed('<C-R>r<C-X><C-X>')
|
||||||
|
screen:expect([[
|
||||||
{7: 1 } |
|
{7: 1 } |
|
||||||
{7: 2 } |
|
{7: 2 } |
|
||||||
{7: 3 } |
|
{7: 3 } |
|
||||||
@ -731,9 +717,9 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳{2:^µ̳}µ̳ |
|
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳{2:^µ̳}µ̳ |
|
||||||
{3:-- TERMINAL --} |
|
{3:-- TERMINAL --} |
|
||||||
]])
|
]])
|
||||||
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([[
|
||||||
{7: 1 } |
|
{7: 1 } |
|
||||||
{7: 2 } |
|
{7: 2 } |
|
||||||
{7: 3 } |
|
{7: 3 } |
|
||||||
@ -742,12 +728,13 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳^µ̳{4:µ̳}µ̳ |
|
{7: 6 }:µ̳µ̳µ̳µ̳µ̳^µ̳{4:µ̳}µ̳ |
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
eq({ 6, 21 }, eval('nvim_win_get_cursor(0)'))
|
eq({ 6, 21 }, eval('nvim_win_get_cursor(0)'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('near the start', function()
|
it('near the start', function()
|
||||||
feed('<C-R>r<C-B><C-O>')
|
skip(is_os('win'))
|
||||||
screen:expect([[
|
feed('<C-R>r<C-B><C-O>')
|
||||||
|
screen:expect([[
|
||||||
{7: 1 } |
|
{7: 1 } |
|
||||||
{7: 2 } |
|
{7: 2 } |
|
||||||
{7: 3 } |
|
{7: 3 } |
|
||||||
@ -756,9 +743,9 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
{7: 6 }:µ̳{2:^µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
{7: 6 }:µ̳{2:^µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||||
{3:-- TERMINAL --} |
|
{3:-- TERMINAL --} |
|
||||||
]])
|
]])
|
||||||
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([[
|
||||||
{7: 1 } |
|
{7: 1 } |
|
||||||
{7: 2 } |
|
{7: 2 } |
|
||||||
{7: 3 } |
|
{7: 3 } |
|
||||||
@ -767,16 +754,11 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
|||||||
{7: 6 }:^µ̳{4:µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
{7: 6 }:^µ̳{4:µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
eq({ 6, 1 }, eval('nvim_win_get_cursor(0)'))
|
eq({ 6, 1 }, eval('nvim_win_get_cursor(0)'))
|
||||||
end)
|
end)
|
||||||
end
|
end)
|
||||||
)
|
|
||||||
|
|
||||||
describe('in a line with double-cell multibyte characters and no trailing spaces,', function()
|
|
||||||
if skip(is_os('win'), 'Encoding problem?') then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
|
describe('in a line with double-cell multibyte chars and no trailing spaces,', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
setup_ex_register('哦哦哦哦哦哦哦哦')
|
setup_ex_register('哦哦哦哦哦哦哦哦')
|
||||||
end)
|
end)
|
||||||
|
@ -83,7 +83,6 @@ describe('TUI', function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
it('rapid resize #7572 #7628', function()
|
it('rapid resize #7572 #7628', function()
|
||||||
helpers.skip(helpers.is_asan(), 'Test extra unstable with ASAN. See #23762')
|
|
||||||
-- Need buffer rows to provoke the behavior.
|
-- Need buffer rows to provoke the behavior.
|
||||||
feed_data(':edit test/functional/fixtures/bigfile.txt\n')
|
feed_data(':edit test/functional/fixtures/bigfile.txt\n')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Loading…
Reference in New Issue
Block a user