From 15993ce9210e8b8d4bc11e1d640f6447b18d3e6c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Oct 2017 20:21:44 +0200 Subject: 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 #2256) --- src/testdir/test_source_utf8.vim | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/testdir/test_source_utf8.vim') 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\", + \ "map __2 asd\\", + \ "map __3 asd\\", + \ "map __4 asd\\\", + \ "map __5 asd\\\", + \ ], 'Xtestfile') + source Xtestfile + enew! + exe "normal __1\\__2\__3\\__4\__5\" + exe "%s/\/0/g" + call assert_equal(['sd', + \ "map __2 asd\secondsd\sd0map __5 asd0fifth"], + \ getline(1, 2)) + + enew! + call delete('Xtestfile') + unmap __1 + unmap __2 + unmap __3 + unmap __4 + unmap __5 +endfunc -- cgit v1.2.1