aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-04 12:29:01 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-05-04 12:29:07 +0800
commitecfca812d660fd02e1fb71d0fbbd57d7a4dbf21a (patch)
tree490ab9db0519d3dbb00f81493f2c826342d6f879
parentdd8ebea01e26445d540272147f317b6f0b3cfff4 (diff)
downloadrneovim-ecfca812d660fd02e1fb71d0fbbd57d7a4dbf21a.tar.gz
rneovim-ecfca812d660fd02e1fb71d0fbbd57d7a4dbf21a.tar.bz2
rneovim-ecfca812d660fd02e1fb71d0fbbd57d7a4dbf21a.zip
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. https://github.com/vim/vim/commit/47da934844afec7b04d94e0d1f8cf0a86e1b9bea Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--test/old/testdir/test_blockedit.vim25
1 files changed, 13 insertions, 12 deletions
diff --git a/test/old/testdir/test_blockedit.vim b/test/old/testdir/test_blockedit.vim
index 2d58f0acf9..e0cfe11af0 100644
--- a/test/old/testdir/test_blockedit.vim
+++ b/test/old/testdir/test_blockedit.vim
@@ -18,6 +18,7 @@ endfunc
func Test_blockinsert_autoindent()
new
let lines =<< trim END
+ vim9script
var d = {
a: () => 0,
b: () => 0,
@@ -28,42 +29,42 @@ func Test_blockinsert_autoindent()
filetype plugin indent on
setlocal sw=2 et ft=vim
setlocal indentkeys+=:
- exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>"
- " FIXME: what do we really expect?
+ exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
let expected =<< trim END
+ vim9script
var d = {
- a: (): asdf => 0,
+ a: (): asdf => 0,
b: (): asdf => 0,
c: (): asdf => 0,
}
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
:%dele
call setline(1, lines)
- exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>"
- call assert_equal(expected, getline(1, 5))
+ exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
+ call assert_equal(expected, getline(1, 6))
:%dele
call setline(1, lines)
setlocal sw=8 noet
- exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>"
- " FIXME: what do we really expect?
+ exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
let expected =<< trim END
+ vim9script
var d = {
- a: (): asdf => 0,
+ a: (): asdf => 0,
b: (): asdf => 0,
c: (): asdf => 0,
}
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
:%dele
call setline(1, lines)
- exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>"
- call assert_equal(expected, getline(1, 5))
+ exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
+ call assert_equal(expected, getline(1, 6))
filetype off
bwipe!