diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-12 22:07:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-12 22:07:13 +0200 |
commit | f4e8cdd3d2156ab52aea1c7a392df66b7210e5eb (patch) | |
tree | dc6d9acee8bb857e78d4e3d097645b3f105389d2 /src/testdir/test_vim9_func.vim | |
parent | fc8aa6d02d85b0df703e0a790137891c91503c9e (diff) | |
download | vim-git-f4e8cdd3d2156ab52aea1c7a392df66b7210e5eb.tar.gz |
patch 8.2.1840: Vim9: error message is not clear about compilation errorv8.2.1840
Problem: Vim9: error message is not clear about compilation error.
Solution: Say "compiling" instead of "processing".
Diffstat (limited to 'src/testdir/test_vim9_func.vim')
-rw-r--r-- | src/testdir/test_vim9_func.vim | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim index 371b9efbc..4329754c3 100644 --- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -13,6 +13,38 @@ func Test_def_basic() call SomeFunc()->assert_equal('yes') endfunc +def Test_compiling_error() + # use a terminal to see the whole error message + CheckRunVimInTerminal + + var lines =<< trim END + vim9script + def Fails() + echo nothing + enddef + defcompile + END + call writefile(lines, 'XTest_compile_error') + var buf = RunVimInTerminal('-S XTest_compile_error', + #{rows: 10, wait_for_ruler: 0}) + var text = '' + for loop in range(100) + text = '' + for i in range(1, 9) + text ..= term_getline(buf, i) + endfor + if text =~ 'Error detected' + break + endif + sleep 20m + endfor + assert_match('Error detected while compiling command line.*Fails.*Variable not found: nothing', text) + + # clean up + call StopVimInTerminal(buf) + call delete('XTest_compile_error') +enddef + def ReturnString(): string return 'string' enddef |