018_unset_smart_indenting_spec.lua 657 B

123456789101112131415161718192021222324252627282930313233
  1. -- Tests for not doing smart indenting when it isn't set.
  2. local n = require('test.functional.testnvim')()
  3. local feed = n.feed
  4. local clear = n.clear
  5. local insert = n.insert
  6. local expect = n.expect
  7. local feed_command = n.feed_command
  8. describe('unset smart indenting', function()
  9. before_each(clear)
  10. it('is working', function()
  11. insert([[
  12. start text
  13. some test text
  14. test text
  15. test text
  16. test text]])
  17. feed_command('set nocin nosi ai')
  18. feed_command('/some')
  19. feed('2cc#test<Esc>')
  20. expect([[
  21. start text
  22. #test
  23. test text
  24. test text]])
  25. end)
  26. end)