Mercurial > vim
diff src/testdir/test108.ok @ 7605:8fc60af6dbf5 v7.4.1102
commit https://github.com/vim/vim/commit/f1f60f859cdbb2638b3662ccf7b1d179865fe7dc
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 16 15:40:53 2016 +0100
patch 7.4.1102
Problem: Debugger has no stack backtrace support.
Solution: Add "backtrace", "frame", "up" and "down" commands. (Alberto
Fanjul, closes https://github.com/vim/vim/issues/433)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 16 Jan 2016 15:45:04 +0100 |
parents | |
children | a527110d5f56 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/src/testdir/test108.ok @@ -0,0 +1,84 @@ + + + +- 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] + 0 Bazz +line 2: let var3 = "another var" +3 +->2 function Foo[2] + 1 Bar[2] + 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: +E121: Undefined variable: var3 +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: +E121: Undefined variable: var2 +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 +line 3: End of function +frame is zero + 1 function Foo[2] +->0 Bar +line 3: End of function + +- final result 19: +19 +