tabstop_spec.lua 719 B

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