comparison src/testdir/test_blockedit.vim @ 30554:eaa79e688fb8 v9.0.0612

patch 9.0.0612: blockedit test passes with wrong result Commit: https://github.com/vim/vim/commit/47da934844afec7b04d94e0d1f8cf0a86e1b9bea Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 27 22:18:13 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 27 Sep 2022 23:30:06 +0200
parents 84ea6d876d43
children dbec60b8c253
comparison
equal deleted inserted replaced
30553:7e5ff77472b2 30554:eaa79e688fb8
15 endfunc 15 endfunc
16 16
17 func Test_blockinsert_autoindent() 17 func Test_blockinsert_autoindent()
18 new 18 new
19 let lines =<< trim END 19 let lines =<< trim END
20 vim9script
20 var d = { 21 var d = {
21 a: () => 0, 22 a: () => 0,
22 b: () => 0, 23 b: () => 0,
23 c: () => 0, 24 c: () => 0,
24 } 25 }
25 END 26 END
26 call setline(1, lines) 27 call setline(1, lines)
27 filetype plugin indent on 28 filetype plugin indent on
28 setlocal sw=2 et ft=vim 29 setlocal sw=2 et ft=vim
29 setlocal indentkeys+=: 30 setlocal indentkeys+=:
30 exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>" 31 exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
31 " FIXME: what do we really expect?
32 let expected =<< trim END 32 let expected =<< trim END
33 vim9script
33 var d = { 34 var d = {
34 a: (): asdf => 0, 35 a: (): asdf => 0,
35 b: (): asdf => 0, 36 b: (): asdf => 0,
36 c: (): asdf => 0, 37 c: (): asdf => 0,
37 } 38 }
38 END 39 END
39 call assert_equal(expected, getline(1, 5)) 40 call assert_equal(expected, getline(1, 6))
40 41
41 " insert on the next column should do exactly the same 42 " insert on the next column should do exactly the same
42 :%dele 43 :%dele
43 call setline(1, lines) 44 call setline(1, lines)
44 exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>" 45 exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
45 call assert_equal(expected, getline(1, 5)) 46 call assert_equal(expected, getline(1, 6))
46 47
47 :%dele 48 :%dele
48 call setline(1, lines) 49 call setline(1, lines)
49 setlocal sw=8 noet 50 setlocal sw=8 noet
50 exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>" 51 exe "norm! 3Gf)\<c-v>2jA: asdf\<esc>"
51 " FIXME: what do we really expect?
52 let expected =<< trim END 52 let expected =<< trim END
53 vim9script
53 var d = { 54 var d = {
54 a: (): asdf => 0, 55 a: (): asdf => 0,
55 b: (): asdf => 0, 56 b: (): asdf => 0,
56 c: (): asdf => 0, 57 c: (): asdf => 0,
57 } 58 }
58 END 59 END
59 call assert_equal(expected, getline(1, 5)) 60 call assert_equal(expected, getline(1, 6))
60 61
61 " insert on the next column should do exactly the same 62 " insert on the next column should do exactly the same
62 :%dele 63 :%dele
63 call setline(1, lines) 64 call setline(1, lines)
64 exe "norm! 2Gf)l\<c-v>2jI: asdf\<esc>" 65 exe "norm! 3Gf)l\<c-v>2jI: asdf\<esc>"
65 call assert_equal(expected, getline(1, 5)) 66 call assert_equal(expected, getline(1, 6))
66 67
67 filetype off 68 filetype off
68 bwipe! 69 bwipe!
69 endfunc 70 endfunc
70 71