081_coptions_movement_spec.lua 773 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. -- Test for t movement command and 'cpo-;' setting
  2. local n = require('test.functional.testnvim')()
  3. local clear, feed, insert = n.clear, n.feed, n.insert
  4. local feed_command, expect = n.feed_command, n.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)