diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-08 20:12:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 20:12:58 +0800 |
commit | b999de2eb019af88cd01b4e95480b784a71228eb (patch) | |
tree | fc0d0af9efc6a492360cca6db991b1e0fd451e51 /test | |
parent | ca64b589cd74e9f6bd369286a415711ec7197082 (diff) | |
parent | a6803f3adfc8b493c9e76343cc78f99ca8c1d3c9 (diff) | |
download | rneovim-b999de2eb019af88cd01b4e95480b784a71228eb.tar.gz rneovim-b999de2eb019af88cd01b4e95480b784a71228eb.tar.bz2 rneovim-b999de2eb019af88cd01b4e95480b784a71228eb.zip |
Merge pull request #19278 from zeertzjq/vim-8.2.0132
vim-patch:8.2.{0132,0136,0151}: detecting a script was already sourced is unreliable
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ex_cmds/source_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/source_spec.lua b/test/functional/ex_cmds/source_spec.lua index fa650d611b..13a40fcc53 100644 --- a/test/functional/ex_cmds/source_spec.lua +++ b/test/functional/ex_cmds/source_spec.lua @@ -19,6 +19,26 @@ describe(':source', function() clear() end) + it('sourcing a file that is deleted and recreated is consistent vim-patch:8.1.0151', function() + local test_file = 'Xfile.vim' + local other_file = 'Xfoobar' + local script = [[ + func Func() + endfunc + ]] + write_file(test_file, script) + command('source ' .. test_file) + os.remove(test_file) + write_file(test_file, script) + command('source ' .. test_file) + os.remove(test_file) + write_file(other_file, '') + write_file(test_file, script) + command('source ' .. test_file) + os.remove(other_file) + os.remove(test_file) + end) + it('current buffer', function() insert([[ let a = 2 |