diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-25 16:22:39 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-25 16:22:39 +0800 |
| commit | 2efcb1a7e9a3d98c2bdacb769d094e4920149755 (patch) | |
| tree | 532dc6005d9f54edd8234a47aff0798103cf3912 /src/nvim/testdir/test_source.vim | |
| parent | 7875e1377c24699a3773609996c4e21320a09f31 (diff) | |
| parent | 84646b80f3adb14d8e7c052047e2cb30a16b1eca (diff) | |
| download | rneovim-2efcb1a7e9a3d98c2bdacb769d094e4920149755.tar.gz rneovim-2efcb1a7e9a3d98c2bdacb769d094e4920149755.tar.bz2 rneovim-2efcb1a7e9a3d98c2bdacb769d094e4920149755.zip | |
Merge pull request #21188 from zeertzjq/vim-8.2.2684
vim-patch:8.2.{2684,2713}: fold tests
Diffstat (limited to 'src/nvim/testdir/test_source.vim')
| -rw-r--r-- | src/nvim/testdir/test_source.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_source.vim b/src/nvim/testdir/test_source.vim index 0fd923abf2..d4d96e36bf 100644 --- a/src/nvim/testdir/test_source.vim +++ b/src/nvim/testdir/test_source.vim @@ -1,5 +1,8 @@ " Tests for the :source command. +source check.vim +source view_util.vim + func Test_source_autocmd() call writefile([ \ 'let did_source = 1', @@ -93,4 +96,18 @@ func Test_source_error() " call assert_fails('scriptversion 2', 'E984:') endfunc +" Test for sourcing a script recursively +func Test_nested_script() + CheckRunVimInTerminal + call writefile([':source! Xscript.vim', ''], 'Xscript.vim') + let buf = RunVimInTerminal('', {'rows': 6}) + call term_wait(buf) + call term_sendkeys(buf, ":set noruler\n") + call term_sendkeys(buf, ":source! Xscript.vim\n") + call term_wait(buf) + call WaitForAssert({-> assert_match('E22: Scripts nested too deep\s*', term_getline(buf, 6))}) + call delete('Xscript.vim') + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |