vvar_event_spec.lua 445 B

1234567891011121314151617
  1. local t = require('test.testutil')
  2. local n = require('test.functional.testnvim')()
  3. local clear, eval, eq = n.clear, n.eval, t.eq
  4. local command = n.command
  5. describe('v:event', function()
  6. before_each(clear)
  7. it('is empty before any autocommand', function()
  8. eq({}, eval('v:event'))
  9. end)
  10. it('is immutable', function()
  11. eq(false, pcall(command, 'let v:event = {}'))
  12. eq(false, pcall(command, 'let v:event.mykey = {}'))
  13. end)
  14. end)