patch 8.2.3984: debugger test fails

Problem:    Debugger test fails.
Solution:   Adjust the test for modified debugging of a for loop.
This commit is contained in:
Bram Moolenaar
2022-01-02 17:28:57 +00:00
parent eaaac014a0
commit 3d0da09bb2
2 changed files with 13 additions and 6 deletions

View File

@ -1121,17 +1121,20 @@ func Test_debug_def_function()
call RunDbgCmd(buf, 'echo nr', ['42'])
call RunDbgCmd(buf, 'echo items', ['[1, 2, 3]'])
call RunDbgCmd(buf, 'step', ['asdf42', 'function FuncWithArgs', 'line 2: for it in items'])
call RunDbgCmd(buf, 'echo it', ['1'])
call RunDbgCmd(buf, 'step', ['function FuncWithArgs', 'line 2: for it in items'])
call RunDbgCmd(buf, 'echo it', ['0'])
call RunDbgCmd(buf, 'step', ['line 3: echo it'])
call RunDbgCmd(buf, 'echo it', ['1'])
call RunDbgCmd(buf, 'step', ['1', 'function FuncWithArgs', 'line 4: endfor'])
call RunDbgCmd(buf, 'step', ['line 2: for it in items'])
call RunDbgCmd(buf, 'echo it', ['2'])
call RunDbgCmd(buf, 'echo it', ['1'])
call RunDbgCmd(buf, 'step', ['line 3: echo it'])
call RunDbgCmd(buf, 'step', ['2', 'function FuncWithArgs', 'line 4: endfor'])
call RunDbgCmd(buf, 'step', ['line 2: for it in items'])
call RunDbgCmd(buf, 'echo it', ['3'])
call RunDbgCmd(buf, 'echo it', ['2'])
call RunDbgCmd(buf, 'step', ['line 3: echo it'])
call RunDbgCmd(buf, 'step', ['3', 'function FuncWithArgs', 'line 4: endfor'])
call RunDbgCmd(buf, 'step', ['line 2: for it in items'])
call RunDbgCmd(buf, 'step', ['line 5: echo "done"'])
call RunDbgCmd(buf, 'cont')
@ -1150,10 +1153,12 @@ func Test_debug_def_function()
call RunDbgCmd(buf, ':breakadd func 2 FuncForLoop')
call RunDbgCmd(buf, ':call FuncForLoop()', ['function FuncForLoop', 'line 2: for i in [11, 22, 33]'])
call RunDbgCmd(buf, 'echo i', ['11'])
call RunDbgCmd(buf, 'step', ['line 2: for i in [11, 22, 33]'])
call RunDbgCmd(buf, 'next', ['function FuncForLoop', 'line 3: eval i + 2'])
call RunDbgCmd(buf, 'echo i', ['11'])
call RunDbgCmd(buf, 'next', ['function FuncForLoop', 'line 4: endfor'])
call RunDbgCmd(buf, 'next', ['function FuncForLoop', 'line 2: for i in [11, 22, 33]'])
call RunDbgCmd(buf, 'next', ['line 3: eval i + 2'])
call RunDbgCmd(buf, 'echo i', ['22'])
call RunDbgCmd(buf, 'breakdel *')

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3984,
/**/
3983,
/**/