From 7ab9ff88e6c7d234c5e9189521da539d20b5bfa7 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Mon, 29 Feb 2016 15:27:11 +0100 Subject: eval: add v:event, which will contain data events want to propagate to their receivers. Add helper functions dict_clear and dict_set_keys_readonly. --- test/functional/eval/vvar_event_spec.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/functional/eval/vvar_event_spec.lua (limited to 'test') diff --git a/test/functional/eval/vvar_event_spec.lua b/test/functional/eval/vvar_event_spec.lua new file mode 100644 index 0000000000..bbac86524f --- /dev/null +++ b/test/functional/eval/vvar_event_spec.lua @@ -0,0 +1,15 @@ +local helpers = require('test.functional.helpers') +local clear, eval, eq = helpers.clear, helpers.eval, helpers.eq +local command = helpers.command +describe('v:event', function() + before_each(clear) + it('is empty before any autocommand', function() + eq({}, eval('v:event')) + end) + + it('is immutable', function() + eq(false, pcall(command, 'let v:event = {}')) + eq(false, pcall(command, 'let v:event.mykey = {}')) + end) +end) + -- cgit