tabstop_spec.lua 692 B

1234567891011121314151617181920212223
  1. local helpers = require('test.functional.helpers')(after_each)
  2. local assert_alive = helpers.assert_alive
  3. local clear = helpers.clear
  4. local feed = helpers.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)