-- Test for sourcing a file with CTRL-V's at the end of the line local helpers = require('test.functional.helpers')(after_each) local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local feed_command, expect = helpers.feed_command, 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') feed_command('so Xtestfile') feed_command('%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)