modeline_spec.lua 511 B

12345678910111213141516171819202122
  1. local t = require('test.testutil')
  2. local n = require('test.functional.testnvim')()
  3. local assert_alive = n.assert_alive
  4. local clear, command, write_file = n.clear, n.command, t.write_file
  5. describe('modeline', function()
  6. local tempfile = t.tmpname()
  7. before_each(clear)
  8. after_each(function()
  9. os.remove(tempfile)
  10. end)
  11. it('does not crash with a large version number', function()
  12. write_file(tempfile, 'vim100000000000000000000000')
  13. command('e! ' .. tempfile)
  14. assert_alive()
  15. end)
  16. end)