diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-28 13:40:26 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-02-28 18:21:07 +0800 |
commit | a3a9f86d4a11029542a94b00044b5a181a68c9cd (patch) | |
tree | a7c1400e2cf08609baa4ade617e6fcd1f617d6e9 /test | |
parent | 9b25c68db21c4a2c1edc0d9eb2cdb80cf249193a (diff) | |
download | rneovim-a3a9f86d4a11029542a94b00044b5a181a68c9cd.tar.gz rneovim-a3a9f86d4a11029542a94b00044b5a181a68c9cd.tar.bz2 rneovim-a3a9f86d4a11029542a94b00044b5a181a68c9cd.zip |
vim-patch:8.2.4594: need to write script to a file to be able to source them
Problem: Need to write script to a file to be able to source them.
Solution: Make ":source" use lines from the current buffer. (Yegappan
Lakshmanan et al., closes vim/vim#9967)
https://github.com/vim/vim/commit/36a5b6867bb6c0bd69c8da7d788000ab8a0b0ab0
Most code and test changes are reverted or modified again in patch
8.2.4603, so only port parts that are untouched in patch 8.2.4603.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_source.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/old/testdir/test_source.vim b/test/old/testdir/test_source.vim index 01c08b183c..130d859224 100644 --- a/test/old/testdir/test_source.vim +++ b/test/old/testdir/test_source.vim @@ -92,6 +92,12 @@ func Test_source_error() call assert_fails('scriptencoding utf-8', 'E167:') call assert_fails('finish', 'E168:') " call assert_fails('scriptversion 2', 'E984:') + call assert_fails('source!', 'E471:') + new + call setline(1, ['', '', '', '']) + call assert_fails('1,3source Xscript.vim', 'E481:') + call assert_fails('1,3source! Xscript.vim', 'E481:') + bw! endfunc " Test for sourcing a script recursively |