081_coptions_movement_spec.lua 817 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. -- Test for t movement command and 'cpo-;' setting
  2. local helpers = require('test.functional.helpers')(after_each)
  3. local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
  4. local feed_command, expect = helpers.feed_command, helpers.expect
  5. describe('coptions', function()
  6. setup(clear)
  7. -- luacheck: ignore 613 (Trailing whitespace in a string)
  8. it('is working', function()
  9. insert([[
  10. aaa two three four
  11. zzz
  12. yyy
  13. bbb yee yoo four
  14. ccc two three four
  15. ddd yee yoo four]])
  16. feed_command('set cpo-=;')
  17. feed('gg0tt;D')
  18. feed('j0fz;D')
  19. feed('j$Fy;D')
  20. feed('j$Ty;D')
  21. feed_command('set cpo+=;')
  22. feed('j0tt;;D')
  23. feed('j$Ty;;D')
  24. expect([[
  25. aaa two
  26. z
  27. y
  28. bbb y
  29. ccc
  30. ddd yee y]])
  31. end)
  32. end)