summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_textformat.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-20 16:05:32 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-20 16:05:32 +0200
commit845e0ee59430eac07e74b6cb92020e420d17953d (patch)
tree26060a20d77b243156cdeda2d6ae7a735469bff3 /src/testdir/test_textformat.vim
parenta190548e9165bbae75144a3e47f01d7708b29073 (diff)
patch 8.2.1022: various parts of code not covered by testsv8.2.1022
Problem: Various parts of code not covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes #6300)
Diffstat (limited to 'src/testdir/test_textformat.vim')
-rw-r--r--src/testdir/test_textformat.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_textformat.vim b/src/testdir/test_textformat.vim
index 33daaab651..d529b8520a 100644
--- a/src/testdir/test_textformat.vim
+++ b/src/testdir/test_textformat.vim
@@ -1116,6 +1116,20 @@ func Test_fo_a_w()
call feedkeys("iabc abc a abc\<Esc>k0weade", 'xt')
call assert_equal(['abc abcde ', 'a abc'], getline(1, '$'))
+ " when a line ends with space, it is not broken up.
+ %d
+ call feedkeys("ione two to ", 'xt')
+ call assert_equal('one two to ', getline(1))
+
+ " when a line ends with spaces and backspace is used in the next line, the
+ " last space in the previous line should be removed.
+ %d
+ set backspace=indent,eol,start
+ call setline(1, ['one ', 'two'])
+ exe "normal 2Gi\<BS>"
+ call assert_equal(['one two'], getline(1, '$'))
+ set backspace&
+
" Test for 'a', 'w' and '1' options.
setlocal textwidth=0
setlocal fo=1aw