tabstop_spec.lua 659 B

1234567891011121314151617181920212223
  1. local n = require('test.functional.testnvim')()
  2. local assert_alive = n.assert_alive
  3. local clear = n.clear
  4. local feed = n.feed
  5. describe("'tabstop' option", function()
  6. before_each(function()
  7. clear()
  8. end)
  9. -- NOTE: Setting 'tabstop' to a big number reproduces crash #2838.
  10. -- Disallowing big 'tabstop' would not fix #2838, only hide it.
  11. it('tabstop=<big-number> does not crash #2838', function()
  12. -- Insert a <Tab> character for 'tabstop' to work with.
  13. feed('i<Tab><Esc>')
  14. -- Set 'tabstop' to a very high value.
  15. -- Use feed(), not command(), to provoke crash.
  16. feed(':set tabstop=3000000000<CR>')
  17. assert_alive()
  18. end)
  19. end)