diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-02 23:14:30 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 15:29:19 +0100 |
| commit | 2de447b60c04fcaad3d762851c512b2545ea6bad (patch) | |
| tree | b8e83360138fefe879707ac6ef411e45d86fde9b /src/nvim/testdir/test_source_utf8.vim | |
| parent | 0a531ddf873202d258809207f6d85e09a5207b31 (diff) | |
| download | rneovim-2de447b60c04fcaad3d762851c512b2545ea6bad.tar.gz rneovim-2de447b60c04fcaad3d762851c512b2545ea6bad.tar.bz2 rneovim-2de447b60c04fcaad3d762851c512b2545ea6bad.zip | |
vim-patch:8.0.1221: still too many old style tests
Problem: Still too many old style tests.
Solution: Convert a few more tests to new style. (Yegappan Lakshmanan,
closes vim/vim#2256)
https://github.com/vim/vim/commit/15993ce9210e8b8d4bc11e1d640f6447b18d3e6c
Diffstat (limited to 'src/nvim/testdir/test_source_utf8.vim')
| -rw-r--r-- | src/nvim/testdir/test_source_utf8.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_source_utf8.vim b/src/nvim/testdir/test_source_utf8.vim index edb76fc43d..c29c2ec1f3 100644 --- a/src/nvim/testdir/test_source_utf8.vim +++ b/src/nvim/testdir/test_source_utf8.vim @@ -31,3 +31,33 @@ func Test_source_latin() bwipe! call delete('Xscript') endfunc + +" Test for sourcing a file with CTRL-V's at the end of the line +func Test_source_ctrl_v() + call writefile(['map __1 afirst', + \ 'map __2 asecond', + \ 'map __3 athird', + \ 'map __4 afourth', + \ 'map __5 afifth', + \ "map __1 asd\<C-V>", + \ "map __2 asd\<C-V>\<C-V>", + \ "map __3 asd\<C-V>\<C-V>", + \ "map __4 asd\<C-V>\<C-V>\<C-V>", + \ "map __5 asd\<C-V>\<C-V>\<C-V>", + \ ], 'Xtestfile') + source Xtestfile + enew! + exe "normal __1\<Esc>\<Esc>__2\<Esc>__3\<Esc>\<Esc>__4\<Esc>__5\<Esc>" + exe "%s/\<C-J>/0/g" + call assert_equal(['sd', + \ "map __2 asd\<Esc>secondsd\<Esc>sd0map __5 asd0fifth"], + \ getline(1, 2)) + + enew! + call delete('Xtestfile') + unmap __1 + unmap __2 + unmap __3 + unmap __4 + unmap __5 +endfunc |