comparison src/testdir/test_textformat.vim @ 20941:505d97ea54da v8.2.1022

patch 8.2.1022: various parts of code not covered by tests Commit: https://github.com/vim/vim/commit/845e0ee59430eac07e74b6cb92020e420d17953d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 20 16:05:32 2020 +0200 patch 8.2.1022: various parts of code not covered by tests Problem: Various parts of code not covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6300)
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Jun 2020 16:15:04 +0200
parents bce10d039e06
children 55b3849ded11
comparison
equal deleted inserted replaced
20940:88ce5327f213 20941:505d97ea54da
1114 new 1114 new
1115 setlocal fo+=aw tw=10 1115 setlocal fo+=aw tw=10
1116 call feedkeys("iabc abc a abc\<Esc>k0weade", 'xt') 1116 call feedkeys("iabc abc a abc\<Esc>k0weade", 'xt')
1117 call assert_equal(['abc abcde ', 'a abc'], getline(1, '$')) 1117 call assert_equal(['abc abcde ', 'a abc'], getline(1, '$'))
1118 1118
1119 " when a line ends with space, it is not broken up.
1120 %d
1121 call feedkeys("ione two to ", 'xt')
1122 call assert_equal('one two to ', getline(1))
1123
1124 " when a line ends with spaces and backspace is used in the next line, the
1125 " last space in the previous line should be removed.
1126 %d
1127 set backspace=indent,eol,start
1128 call setline(1, ['one ', 'two'])
1129 exe "normal 2Gi\<BS>"
1130 call assert_equal(['one two'], getline(1, '$'))
1131 set backspace&
1132
1119 " Test for 'a', 'w' and '1' options. 1133 " Test for 'a', 'w' and '1' options.
1120 setlocal textwidth=0 1134 setlocal textwidth=0
1121 setlocal fo=1aw 1135 setlocal fo=1aw
1122 %d 1136 %d
1123 call setline(1, '. foo') 1137 call setline(1, '. foo')