diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-12 14:45:36 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-12 16:23:32 +0800 |
| commit | 4aa4675fbface275224d178ebb436bc214dd1056 (patch) | |
| tree | c54a5272b2cc8415b82549ba48381e423791090c /src/nvim/testdir/test_vimscript.vim | |
| parent | 01afd43bc90408b43db906845245a4959c8ee3a0 (diff) | |
| download | rneovim-4aa4675fbface275224d178ebb436bc214dd1056.tar.gz rneovim-4aa4675fbface275224d178ebb436bc214dd1056.tar.bz2 rneovim-4aa4675fbface275224d178ebb436bc214dd1056.zip | |
vim-patch:8.2.0293: various Ex commands not sufficiently tested
Problem: Various Ex commands not sufficiently tested.
Solution: Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5673)
https://github.com/vim/vim/commit/818fc9ad143911b2faa0d7cee86724aa70a02080
Needs to assert E170 instead of E580 because patch 8.2.3486 has been
ported but patch 8.2.1183 hasn't.
Diffstat (limited to 'src/nvim/testdir/test_vimscript.vim')
| -rw-r--r-- | src/nvim/testdir/test_vimscript.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim index 1bca5c420c..1323288676 100644 --- a/src/nvim/testdir/test_vimscript.vim +++ b/src/nvim/testdir/test_vimscript.vim @@ -1782,6 +1782,29 @@ func Test_missing_end() call writefile(['try', 'echo "."'], 'Xscript') call assert_fails('source Xscript', 'E600:') call delete('Xscript') + + " Using endfor with :while + let caught_e732 = 0 + try + while v:true + endfor + catch /E732:/ + let caught_e732 = 1 + endtry + call assert_equal(1, caught_e732) + + " Using endwhile with :for + let caught_e733 = 0 + try + for i in range(1) + endwhile + catch /E733:/ + let caught_e733 = 1 + endtry + call assert_equal(1, caught_e733) + + " Missing 'in' in a :for statement + call assert_fails('for i range(1) | endfor', 'E690:') endfunc " Test for deep nesting of if/for/while/try statements {{{1 |