diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-10-26 20:21:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-10-26 20:21:44 +0200 |
commit | 15993ce9210e8b8d4bc11e1d640f6447b18d3e6c (patch) | |
tree | 1c1558bba5fb9a3bd1cfa6d8d494aeca2bd83097 /src/testdir/test_source_utf8.vim | |
parent | 235dddf1f4afe3a40047dbf2aca1bd177b7be18b (diff) | |
download | vim-git-15993ce9210e8b8d4bc11e1d640f6447b18d3e6c.tar.gz |
patch 8.0.1221: still too many old style testsv8.0.1221
Problem: Still too many old style tests.
Solution: Convert a few more tests to new style. (Yegappan Lakshmanan,
closes #2256)
Diffstat (limited to 'src/testdir/test_source_utf8.vim')
-rw-r--r-- | src/testdir/test_source_utf8.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/testdir/test_source_utf8.vim b/src/testdir/test_source_utf8.vim index edb76fc43..c29c2ec1f 100644 --- a/src/testdir/test_source_utf8.vim +++ b/src/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 |