2024-04-20 08:44:13 -07:00
|
|
|
local t = require('test.testutil')
|
|
|
|
local n = require('test.functional.testnvim')()
|
|
|
|
|
|
|
|
local assert_alive = n.assert_alive
|
|
|
|
local clear, command, write_file = n.clear, n.command, t.write_file
|
2016-10-08 08:55:55 -07:00
|
|
|
|
|
|
|
describe('modeline', function()
|
2024-04-08 02:03:20 -07:00
|
|
|
local tempfile = t.tmpname()
|
2016-10-08 08:55:55 -07:00
|
|
|
before_each(clear)
|
|
|
|
|
|
|
|
after_each(function()
|
|
|
|
os.remove(tempfile)
|
|
|
|
end)
|
|
|
|
|
|
|
|
it('does not crash with a large version number', function()
|
|
|
|
write_file(tempfile, 'vim100000000000000000000000')
|
2017-04-08 14:12:26 -07:00
|
|
|
command('e! ' .. tempfile)
|
2016-10-08 08:55:55 -07:00
|
|
|
|
2021-09-01 09:42:53 -07:00
|
|
|
assert_alive()
|
2016-10-08 08:55:55 -07:00
|
|
|
end)
|
|
|
|
end)
|