neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

tabstop_spec.lua (659B)


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