mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 16:42:42 +00:00
legacy tests: migrate test38 #2367
This commit is contained in:
committed by
Justin M. Keyes
parent
9a6a311f35
commit
ee3af18640
@@ -16,7 +16,7 @@ SCRIPTS := test_autoformat_join.out \
|
|||||||
test24.out \
|
test24.out \
|
||||||
test26.out test27.out test29.out test30.out \
|
test26.out test27.out test29.out test30.out \
|
||||||
test31.out test32.out test34.out \
|
test31.out test32.out test34.out \
|
||||||
test36.out test37.out test38.out test39.out test40.out \
|
test36.out test37.out test39.out test40.out \
|
||||||
test42.out test43.out test45.out \
|
test42.out test43.out test45.out \
|
||||||
test46.out test47.out test48.out test49.out \
|
test46.out test47.out test48.out test49.out \
|
||||||
test52.out test53.out test55.out \
|
test52.out test53.out test55.out \
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
|
|
||||||
Test Virtual replace mode.
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
:" make sure that backspace works, no matter what termcap is used
|
|
||||||
:set t_kD=x7f t_kb=x08
|
|
||||||
ggdGa
|
|
||||||
abcdefghi
|
|
||||||
jk lmn
|
|
||||||
opq rst
|
|
||||||
uvwxyz
|
|
||||||
gg:set ai
|
|
||||||
:set bs=2
|
|
||||||
gR0 1
|
|
||||||
A
|
|
||||||
BCDEFGHIJ
|
|
||||||
KL
|
|
||||||
MNO
|
|
||||||
PQRG:ka
|
|
||||||
o0
|
|
||||||
abcdefghi
|
|
||||||
jk lmn
|
|
||||||
opq rst
|
|
||||||
uvwxyz
|
|
||||||
'ajgR0 1
|
|
||||||
A
|
|
||||||
BCDEFGHIJ
|
|
||||||
KL
|
|
||||||
MNO
|
|
||||||
PQR:$
|
|
||||||
iab cdefghi jkl0gRAB......CDEFGHI.Jo:
|
|
||||||
iabcdefghijklmnopqrst0gRAB IJKLMNO QR:wq! test.out
|
|
||||||
ENDTEST
|
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
1
|
|
||||||
A
|
|
||||||
BCDEFGHIJ
|
|
||||||
KL
|
|
||||||
MNO
|
|
||||||
PQR
|
|
||||||
1
|
|
||||||
abcdefghi
|
|
||||||
jk lmn
|
|
||||||
opq rst
|
|
||||||
uvwxyz
|
|
||||||
AB......CDEFGHI.Jkl
|
|
||||||
AB IJKLMNO QRst
|
|
||||||
58
test/functional/legacy/038_virtual_replace_spec.lua
Normal file
58
test/functional/legacy/038_virtual_replace_spec.lua
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
-- Test Virtual replace mode.
|
||||||
|
|
||||||
|
local helpers = require('test.functional.helpers')
|
||||||
|
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
||||||
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
|
describe('Virtual replace mode', function()
|
||||||
|
setup(clear)
|
||||||
|
|
||||||
|
it('is working', function()
|
||||||
|
-- Make sure that backspace works, no matter what termcap is used.
|
||||||
|
execute('set t_kD=x7f t_kb=x08')
|
||||||
|
feed('ggdGa<cr>')
|
||||||
|
feed('abcdefghi<cr>')
|
||||||
|
feed('jk<tab>lmn<cr>')
|
||||||
|
feed('<Space><Space><Space><Space>opq<tab>rst<cr>')
|
||||||
|
feed('<C-d>uvwxyz<cr>')
|
||||||
|
feed('<esc>gg')
|
||||||
|
execute('set ai')
|
||||||
|
execute('set bs=2')
|
||||||
|
feed('gR0<C-d> 1<cr>')
|
||||||
|
feed('A<cr>')
|
||||||
|
feed('BCDEFGHIJ<cr>')
|
||||||
|
feed('<tab>KL<cr>')
|
||||||
|
feed('MNO<cr>')
|
||||||
|
feed('PQR<esc>G')
|
||||||
|
execute('ka')
|
||||||
|
feed('o0<C-d><cr>')
|
||||||
|
feed('abcdefghi<cr>')
|
||||||
|
feed('jk<tab>lmn<cr>')
|
||||||
|
feed('<Space><Space><Space><Space>opq<tab>rst<cr>')
|
||||||
|
feed('<C-d>uvwxyz<cr>')
|
||||||
|
feed([[<esc>'ajgR0<C-d> 1<cr>]])
|
||||||
|
feed('A<cr>')
|
||||||
|
feed('BCDEFGHIJ<cr>')
|
||||||
|
feed('<tab>KL<cr>')
|
||||||
|
feed('MNO<cr>')
|
||||||
|
feed('PQR<C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><C-h><esc>:$<cr>')
|
||||||
|
feed('iab<tab>cdefghi<tab>jkl<esc>0gRAB......CDEFGHI.J<esc>o<esc>:<cr>')
|
||||||
|
feed('iabcdefghijklmnopqrst<esc>0gRAB<tab>IJKLMNO<tab>QR<esc>')
|
||||||
|
|
||||||
|
-- Assert buffer contents.
|
||||||
|
expect([=[
|
||||||
|
1
|
||||||
|
A
|
||||||
|
BCDEFGHIJ
|
||||||
|
KL
|
||||||
|
MNO
|
||||||
|
PQR
|
||||||
|
1
|
||||||
|
abcdefghi
|
||||||
|
jk lmn
|
||||||
|
opq rst
|
||||||
|
uvwxyz
|
||||||
|
AB......CDEFGHI.Jkl
|
||||||
|
AB IJKLMNO QRst]=])
|
||||||
|
end)
|
||||||
|
end)
|
||||||
Reference in New Issue
Block a user