diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-25 21:01:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-25 21:01:48 +0100 |
commit | e5ea346a07a7750c02a89996b67716b43c767d06 (patch) | |
tree | 638de91e30f3a1add0c78c7b75bddf6cedd46ff5 /src/testdir | |
parent | 5c829bf229de463657e4ba1de6c4ee91899de14e (diff) | |
download | vim-git-e5ea346a07a7750c02a89996b67716b43c767d06.tar.gz |
patch 8.2.2409: Vim9: profiling only works for one functionv8.2.2409
Problem: Vim9: profiling only works for one function.
Solution: Select the right instructions when calling and returning.
(closes #7743)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_profile.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_profile.vim b/src/testdir/test_profile.vim index 8aaac90e8..3abe89805 100644 --- a/src/testdir/test_profile.vim +++ b/src/testdir/test_profile.vim @@ -5,6 +5,7 @@ CheckFeature profile source shared.vim source screendump.vim +source vim9.vim func Test_profile_func() call RunProfileFunc('func', 'let', 'let') @@ -583,4 +584,21 @@ func Test_profile_typed_func() call delete('XtestProfile') endfunc +func Test_vim9_profiling() + " only tests that compiling and calling functions doesn't crash + let lines =<< trim END + vim9script + def Func() + Crash() + enddef + def Crash() + enddef + prof start /tmp/profile.log + prof func Func + Func() + END + call CheckScriptSuccess(lines) +endfunc + + " vim: shiftwidth=2 sts=2 expandtab |