summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_blockedit.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-27 22:18:13 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-27 22:18:13 +0100
commit47da934844afec7b04d94e0d1f8cf0a86e1b9bea (patch)
tree97b80d56b6be225d9d8f2b898dda026731b33a76 /src/testdir/test_blockedit.vim
parent70e672580b39eb79607c304803efb954cc11f4e6 (diff)
patch 9.0.0612: blockedit test passes with wrong resultv9.0.0612
Problem: Blockedit test passes with wrong result. Solution: Add a "vim9script" line to make indenting work.
Diffstat (limited to 'src/testdir/test_blockedit.vim')
-rw-r--r--src/testdir/test_blockedit.vim25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/testdir/test_blockedit.vim b/src/testdir/test_blockedit.vim
index 779c6472a6..8497efb083 100644
--- a/src/testdir/test_blockedit.vim
+++ b/src/testdir/test_blockedit.vim
@@ -17,6 +17,7 @@ endfunc
func Test_blockinsert_autoindent()
new
let lines =<< trim END
+ vim9script
var d = {
a: () => 0,
b: () => 0,
@@ -27,42 +28,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!