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. --- .../legacy/108_backtrace_debug_commands_spec.lua | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'test/functional/legacy/108_backtrace_debug_commands_spec.lua') diff --git a/test/functional/legacy/108_backtrace_debug_commands_spec.lua b/test/functional/legacy/108_backtrace_debug_commands_spec.lua index a03092e446..b2e2fa4ed3 100644 --- a/test/functional/legacy/108_backtrace_debug_commands_spec.lua +++ b/test/functional/legacy/108_backtrace_debug_commands_spec.lua @@ -2,32 +2,32 @@ local helpers = require('test.functional.helpers')(after_each) local feed, clear = helpers.feed, helpers.clear -local execute, expect = helpers.execute, helpers.expect +local feed_command, expect = helpers.feed_command, helpers.expect describe('108', function() before_each(clear) it('is working', function() - execute('lang mess C') - execute('function! Foo()') - execute(' let var1 = 1') - execute(' let var2 = Bar(var1) + 9') - execute(' return var2') - execute('endfunction') - execute('function! Bar(var)') - execute(' let var1 = 2 + a:var') - execute(' let var2 = Bazz(var1) + 4') - execute(' return var2') - execute('endfunction') - execute('function! Bazz(var)') - execute(' let var1 = 3 + a:var') - execute(' let var3 = "another var"') - execute(' return var1') - execute('endfunction') - execute('new') - execute('debuggreedy') - execute('redir => out') - execute('debug echo Foo()') + feed_command('lang mess C') + feed_command('function! Foo()') + feed_command(' let var1 = 1') + feed_command(' let var2 = Bar(var1) + 9') + feed_command(' return var2') + feed_command('endfunction') + feed_command('function! Bar(var)') + feed_command(' let var1 = 2 + a:var') + feed_command(' let var2 = Bazz(var1) + 4') + feed_command(' return var2') + feed_command('endfunction') + feed_command('function! Bazz(var)') + feed_command(' let var1 = 3 + a:var') + feed_command(' let var3 = "another var"') + feed_command(' return var1') + feed_command('endfunction') + feed_command('new') + feed_command('debuggreedy') + feed_command('redir => out') + feed_command('debug echo Foo()') feed('step') feed('step') feed('step') @@ -83,9 +83,9 @@ describe('108', function() feed('fram') feed([[echo "\n- final result 19:"]]) feed('cont') - execute('0debuggreedy') - execute('redir END') - execute('$put =out') + feed_command('0debuggreedy') + feed_command('redir END') + feed_command('$put =out') -- Assert buffer contents. expect([=[ -- cgit