From 38bef424a2cdece286d7f87dfbe76a55d76c16f7 Mon Sep 17 00:00:00 2001 From: Rainer Borene Date: Mon, 27 Oct 2014 17:27:20 -0200 Subject: legacy tests: migrate test28 --- test/functional/legacy/028_source_ctrl_v_spec.lua | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/functional/legacy/028_source_ctrl_v_spec.lua (limited to 'test/functional/legacy') 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//g') + feed(':/firstline/+1,/lastline/-1w! Xtestfile') + execute('so Xtestfile') + execute('%d') + feed('Gmm__1__2__3__4__5') + feed(":'m,$s//0/g") + + expect([[ + sd + map __2 asdsecondsdsd0map __5 asd0fifth]]) + end) + + teardown(function() + os.remove('Xtestfile') + end) +end) -- cgit