forked from aniani/vim
patch 9.0.0612: blockedit test passes with wrong result
Problem: Blockedit test passes with wrong result. Solution: Add a "vim9script" line to make indenting work.
This commit is contained in:
parent
70e672580b
commit
47da934844
@ -17,6 +17,7 @@ endfunc
|
|||||||
func Test_blockinsert_autoindent()
|
func Test_blockinsert_autoindent()
|
||||||
new
|
new
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
|
vim9script
|
||||||
var d = {
|
var d = {
|
||||||
a: () => 0,
|
a: () => 0,
|
||||||
b: () => 0,
|
b: () => 0,
|
||||||
@ -27,42 +28,42 @@ func Test_blockinsert_autoindent()
|
|||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
setlocal sw=2 et ft=vim
|
setlocal sw=2 et ft=vim
|
||||||
setlocal indentkeys+=:
|
setlocal indentkeys+=:
|
||||||
exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>"
|
exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
|
||||||
" FIXME: what do we really expect?
|
|
||||||
let expected =<< trim END
|
let expected =<< trim END
|
||||||
|
vim9script
|
||||||
var d = {
|
var d = {
|
||||||
a: (): asdf => 0,
|
a: (): asdf => 0,
|
||||||
b: (): asdf => 0,
|
b: (): asdf => 0,
|
||||||
c: (): asdf => 0,
|
c: (): asdf => 0,
|
||||||
}
|
}
|
||||||
END
|
END
|
||||||
call assert_equal(expected, getline(1, 5))
|
call assert_equal(expected, getline(1, 6))
|
||||||
|
|
||||||
" insert on the next column should do exactly the same
|
" insert on the next column should do exactly the same
|
||||||
:%dele
|
:%dele
|
||||||
call setline(1, lines)
|
call setline(1, lines)
|
||||||
exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>"
|
exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
|
||||||
call assert_equal(expected, getline(1, 5))
|
call assert_equal(expected, getline(1, 6))
|
||||||
|
|
||||||
:%dele
|
:%dele
|
||||||
call setline(1, lines)
|
call setline(1, lines)
|
||||||
setlocal sw=8 noet
|
setlocal sw=8 noet
|
||||||
exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>"
|
exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
|
||||||
" FIXME: what do we really expect?
|
|
||||||
let expected =<< trim END
|
let expected =<< trim END
|
||||||
|
vim9script
|
||||||
var d = {
|
var d = {
|
||||||
a: (): asdf => 0,
|
a: (): asdf => 0,
|
||||||
b: (): asdf => 0,
|
b: (): asdf => 0,
|
||||||
c: (): asdf => 0,
|
c: (): asdf => 0,
|
||||||
}
|
}
|
||||||
END
|
END
|
||||||
call assert_equal(expected, getline(1, 5))
|
call assert_equal(expected, getline(1, 6))
|
||||||
|
|
||||||
" insert on the next column should do exactly the same
|
" insert on the next column should do exactly the same
|
||||||
:%dele
|
:%dele
|
||||||
call setline(1, lines)
|
call setline(1, lines)
|
||||||
exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>"
|
exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
|
||||||
call assert_equal(expected, getline(1, 5))
|
call assert_equal(expected, getline(1, 6))
|
||||||
|
|
||||||
filetype off
|
filetype off
|
||||||
bwipe!
|
bwipe!
|
||||||
|
@ -699,6 +699,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
612,
|
||||||
/**/
|
/**/
|
||||||
611,
|
611,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user