diff options
-rw-r--r-- | src/nvim/testdir/test28.in | bin | 364 -> 0 bytes | |||
-rw-r--r-- | src/nvim/testdir/test28.ok | 2 | ||||
-rw-r--r-- | test/functional/legacy/028_source_ctrl_v_spec.lua | 40 |
3 files changed, 40 insertions, 2 deletions
diff --git a/src/nvim/testdir/test28.in b/src/nvim/testdir/test28.in Binary files differdeleted file mode 100644 index 5542c92666..0000000000 --- a/src/nvim/testdir/test28.in +++ /dev/null diff --git a/src/nvim/testdir/test28.ok b/src/nvim/testdir/test28.ok deleted file mode 100644 index 911d854655..0000000000 --- a/src/nvim/testdir/test28.ok +++ /dev/null @@ -1,2 +0,0 @@ -sd -map __2 asdsecondsdsd0map __5 asd0fifth diff --git a/test/functional/legacy/028_source_ctrl_v_spec.lua b/test/functional/legacy/028_source_ctrl_v_spec.lua new file mode 100644 index 0000000000..fc36b436ef --- /dev/null +++ b/test/functional/legacy/028_source_ctrl_v_spec.lua @@ -0,0 +1,40 @@ +-- Test for sourcing a file with CTRL-V's at the end of the line + +local helpers = require('test.functional.helpers') +local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert +local execute, expect = helpers.execute, helpers.expect + +describe('CTRL-V at the end of the line', function() + setup(clear) + + it('is working', function() + insert([[ + firstline + map __1 afirst + map __2 asecond + map __3 athird + map __4 afourth + map __5 afifth + map __1 asdX + map __2 asdXX + map __3 asdXX + map __4 asdXXX + map __5 asdXXX + lastline]]) + + feed(':%s/X/<C-v><C-v>/g<cr>') + feed(':/firstline/+1,/lastline/-1w! Xtestfile<cr>') + execute('so Xtestfile') + execute('%d') + feed('Gmm__1<Esc><Esc>__2<Esc>__3<Esc><Esc>__4<Esc>__5<Esc>') + feed(":'m,$s/<C-v><C-@>/0/g<cr>") + + expect([[ + sd + map __2 asdsecondsdsd0map __5 asd0fifth]]) + end) + + teardown(function() + os.remove('Xtestfile') + end) +end) |