cpoptions_spec.lua 710 B

1234567891011121314151617181920212223242526272829
  1. local n = require('test.functional.testnvim')()
  2. local Screen = require('test.functional.ui.screen')
  3. local clear = n.clear
  4. local command = n.command
  5. local feed = n.feed
  6. before_each(clear)
  7. describe('cpoptions', function()
  8. it('$', function()
  9. local screen = Screen.new(30, 6)
  10. command('set cpo+=$')
  11. command([[call setline(1, 'one two three')]])
  12. feed('c2w')
  13. screen:expect([[
  14. ^one tw$ three |
  15. {1:~ }|*4
  16. {5:-- INSERT --} |
  17. ]])
  18. feed('vim<Esc>')
  19. screen:expect([[
  20. vi^m three |
  21. {1:~ }|*4
  22. |
  23. ]])
  24. end)
  25. end)