020_blockwise_visual_spec.lua 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 helpers = require('test.functional.helpers')(after_each)
  5. local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
  6. local feed_command, expect = helpers.feed_command, helpers.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)