From 65fb622000af8e3dbb65480e1581758ecf4ba3e2 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 9 Apr 2017 00:12:26 +0300 Subject: functests: Replace execute with either command or feed_command Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed. --- test/functional/eval/special_vars_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/eval/special_vars_spec.lua') diff --git a/test/functional/eval/special_vars_spec.lua b/test/functional/eval/special_vars_spec.lua index 4c5d63ce23..3d9358447e 100644 --- a/test/functional/eval/special_vars_spec.lua +++ b/test/functional/eval/special_vars_spec.lua @@ -1,6 +1,6 @@ local helpers = require('test.functional.helpers')(after_each) local exc_exec = helpers.exc_exec -local execute = helpers.execute +local command = helpers.command local funcs = helpers.funcs local clear = helpers.clear local eval = helpers.eval @@ -12,7 +12,7 @@ describe('Special values', function() before_each(clear) it('do not cause error when freed', function() - execute([[ + command([[ function Test() try return v:true @@ -109,7 +109,7 @@ describe('Special values', function() it('does not work with +=/-=/.=', function() meths.set_var('true', true) meths.set_var('false', false) - execute('let null = v:null') + command('let null = v:null') eq('Vim(let):E734: Wrong variable type for +=', exc_exec('let true += 1')) eq('Vim(let):E734: Wrong variable type for +=', exc_exec('let false += 1')) -- cgit From 9837a9c40105d3d28fc99d62693e47b32cec0f06 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Thu, 9 Nov 2017 02:20:12 +0100 Subject: compat: "v:count" distinct from "count" (#7407) --- test/functional/eval/special_vars_spec.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional/eval/special_vars_spec.lua') diff --git a/test/functional/eval/special_vars_spec.lua b/test/functional/eval/special_vars_spec.lua index 3d9358447e..b5773a5529 100644 --- a/test/functional/eval/special_vars_spec.lua +++ b/test/functional/eval/special_vars_spec.lua @@ -168,4 +168,11 @@ describe('Special values', function() 'Expected True but got v:null', }, meths.get_vvar('errors')) end) + + describe('compat', function() + it('v:count is distinct from count', function() + command('let count = []') -- v:count is readonly + eq(1, eval('count is# g:["count"]')) + end) + end) end) -- cgit