robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

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