diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-15 10:39:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 10:39:41 +0800 |
commit | a6f0e32d23930b5ab7d5c70d0c58e9964e3af408 (patch) | |
tree | d3b03ad0d09022a99f2adc006881a93ed0ebe670 /test/functional/ex_cmds/source_spec.lua | |
parent | 1c164689a4ef243be2a0e1b4332c9b6c56b5b031 (diff) | |
parent | 9ab9eb1220113d247dd1eb089cb6576a135b8699 (diff) | |
download | rneovim-a6f0e32d23930b5ab7d5c70d0c58e9964e3af408.tar.gz rneovim-a6f0e32d23930b5ab7d5c70d0c58e9964e3af408.tar.bz2 rneovim-a6f0e32d23930b5ab7d5c70d0c58e9964e3af408.zip |
Merge pull request #19763 from zeertzjq/vim-8.2.1297
vim-patch:8.2.{1297,1653,1658}: expand('<stack>')
Diffstat (limited to 'test/functional/ex_cmds/source_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/source_spec.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/source_spec.lua b/test/functional/ex_cmds/source_spec.lua index 13a40fcc53..4bc3355e9e 100644 --- a/test/functional/ex_cmds/source_spec.lua +++ b/test/functional/ex_cmds/source_spec.lua @@ -13,6 +13,10 @@ local exec_lua = helpers.exec_lua local eval = helpers.eval local exec_capture = helpers.exec_capture local neq = helpers.neq +local matches = helpers.matches +local iswin = helpers.iswin +local mkdir = helpers.mkdir +local rmdir = helpers.rmdir describe(':source', function() before_each(function() @@ -39,6 +43,30 @@ describe(':source', function() os.remove(test_file) end) + it("changing 'shellslash' changes the result of expand()", function() + if not iswin() then + pending("'shellslash' only works on Windows") + return + end + mkdir('Xshellslash') + local script = [[ + let g:result1 = expand('<stack>') + set shellslash + let g:result2 = expand('<stack>') + set noshellslash + let g:result3 = expand('<stack>') + ]] + write_file([[Xshellslash/Xexpand.vim]], script) + + meths.set_option('shellslash', false) + command([[source Xshellslash/Xexpand.vim]]) + matches([[Xshellslash\Xexpand%.vim]], meths.get_var('result1')) + matches([[Xshellslash/Xexpand%.vim]], meths.get_var('result2')) + matches([[Xshellslash\Xexpand%.vim]], meths.get_var('result3')) + + rmdir('Xshellslash') + end) + it('current buffer', function() insert([[ let a = 2 |