020_blockwise_visual_spec.lua 978 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. -- Tests Blockwise Visual when there are TABs before the text.
  2. -- First test for undo working properly when executing commands from a register.
  3. -- Also test this in an empty buffer.
  4. local n = require('test.functional.testnvim')()
  5. local clear, feed, insert = n.clear, n.feed, n.insert
  6. local feed_command, expect = n.feed_command, n.expect
  7. describe('blockwise visual', function()
  8. setup(clear)
  9. it('is working', function()
  10. insert([[
  11. 123456
  12. 234567
  13. 345678
  14. test text test tex start here
  15. some text
  16. test text
  17. test text
  18. x jAy kdd
  19. Ox jAy kdd]])
  20. feed(":let @a = 'Ox<C-v><Esc>jAy<C-v><Esc>kdd'<cr>")
  21. feed('G0k@au')
  22. feed_command('new')
  23. feed('@auY')
  24. feed_command('quit')
  25. feed('GP')
  26. feed_command('/start here')
  27. feed('"by$<C-v>jjlld')
  28. feed_command('/456')
  29. feed('<C-v>jj"bP')
  30. feed_command('$-3,$d')
  31. expect([[
  32. 123start here56
  33. 234start here67
  34. 345start here78
  35. test text test tex rt here
  36. somext
  37. tesext
  38. test text]])
  39. end)
  40. end)