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 From 126b2ca077718a02c086039c8f98ef267cf9eb3e Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Sun, 24 Sep 2017 20:42:48 +0200 Subject: test: lint whitespace in legacy/ (#7308) --- .../legacy/108_backtrace_debug_commands_spec.lua | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 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 b2e2fa4ed3..ff1917e90c 100644 --- a/test/functional/legacy/108_backtrace_debug_commands_spec.lua +++ b/test/functional/legacy/108_backtrace_debug_commands_spec.lua @@ -89,18 +89,18 @@ describe('108', function() -- Assert buffer contents. expect([=[ - - - + + + - show backtrace: - + 2 function Foo[2] 1 Bar[2] ->0 Bazz line 2: let var3 = "another var" - + show variables on different levels: - + 6 2 function Foo[2] ->1 Bar[2] @@ -112,9 +112,9 @@ describe('108', function() 0 Bazz line 2: let var3 = "another var" 1 - + - undefined vars: - + undefined var3 on former level: Error detected while processing function Foo[2]..Bar[2]..Bazz: line 3: @@ -122,7 +122,7 @@ describe('108', function() E15: Invalid expression: var3 here var3 is defined with "another var": another var - + undefined var2 on former level Error detected while processing function Foo[2]..Bar: line 3: @@ -130,37 +130,37 @@ describe('108', function() E15: Invalid expression: var2 here var2 is defined with 10: 10 - + - backtrace movements: - + 1 function Foo[2] ->0 Bar line 3: End of function - + next command cannot go down, we are on bottom - + frame is zero - + next command cannot go up, we are on top - + frame at highest level: 1 ->1 function Foo[2] 0 Bar line 3: End of function fil is not frame or finish, it is file "[No Name]" --No lines in buffer-- - + - relative backtrace movement - + 1 function Foo[2] ->0 Bar line 3: End of function ->1 function Foo[2] 0 Bar line 3: End of function - + - go beyond limits does not crash - + frame at highest level: 1 ->1 function Foo[2] 0 Bar @@ -169,7 +169,7 @@ describe('108', function() 1 function Foo[2] ->0 Bar line 3: End of function - + - final result 19: 19 ]=]) -- cgit