aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-02-29 15:27:11 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2016-02-29 16:06:41 +0100
commit7ab9ff88e6c7d234c5e9189521da539d20b5bfa7 (patch)
tree9326af04ef2c9b332517210ff81e4648bdfc2d88 /test
parentf2ae5a9cc0b93a4373e15a763c56cd391612c0c4 (diff)
downloadrneovim-7ab9ff88e6c7d234c5e9189521da539d20b5bfa7.tar.gz
rneovim-7ab9ff88e6c7d234c5e9189521da539d20b5bfa7.tar.bz2
rneovim-7ab9ff88e6c7d234c5e9189521da539d20b5bfa7.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/functional/eval/vvar_event_spec.lua15
1 files changed, 15 insertions, 0 deletions
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)
+