aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_source_utf8.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-11 19:59:37 +0100
committerGitHub <noreply@github.com>2018-02-11 19:59:37 +0100
commitf389196a344591da2f6cc2a63f4953e34316f954 (patch)
tree8cce092c29f33ae109dcf61e12e822d84aa014c7 /src/nvim/testdir/test_source_utf8.vim
parent2cfc1b055bba6bb0f7e263a69079c7f52303a78a (diff)
parentf26a4d484b486019c90fc55af5e74e33de374bc4 (diff)
downloadrneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.gz
rneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.bz2
rneovim-f389196a344591da2f6cc2a63f4953e34316f954.zip
Merge #7960 'vim patches'
Diffstat (limited to 'src/nvim/testdir/test_source_utf8.vim')
-rw-r--r--src/nvim/testdir/test_source_utf8.vim30
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