diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-12-25 11:31:54 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-12-25 11:31:54 +0800 |
commit | 42cf76fd0ab2afe3ca633d0d6600c8a771731f57 (patch) | |
tree | 25d8bd975f6185db2fc65616ec28c045ff664b7f /src/nvim/testdir | |
parent | 0d7a97224f28cdf47d7ecc80b6d300c8c67c0b29 (diff) | |
download | rneovim-42cf76fd0ab2afe3ca633d0d6600c8a771731f57.tar.gz rneovim-42cf76fd0ab2afe3ca633d0d6600c8a771731f57.tar.bz2 rneovim-42cf76fd0ab2afe3ca633d0d6600c8a771731f57.zip |
vim-patch:8.2.3780: ":cd" works differently on MS-Windows
Problem: ":cd" works differently on MS-Windows.
Solution: Add the 'cdhome' option. (closes vim/vim#9324)
https://github.com/vim/vim/commit/29f3a4591528130fded3fe1d63d74bcf22ab4f6c
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/runtest.vim | 6 | ||||
-rw-r--r-- | src/nvim/testdir/test_options.vim | 21 |
2 files changed, 24 insertions, 3 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index ab047fd2a8..b0d872e392 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -64,6 +64,9 @@ if has('reltime') let s:start_time = reltime() endif +" Always use forward slashes. +set shellslash + " Common with all tests on all systems. source setup.vim @@ -104,9 +107,6 @@ lang mess C " Nvim: append runtime from build dir, which contains the generated doc/tags. let &runtimepath .= ','.expand($BUILD_DIR).'/runtime/' -" Always use forward slashes. -set shellslash - let s:t_bold = &t_md let s:t_normal = &t_me if has('win32') diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 7d9cada074..5946732937 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -732,4 +732,25 @@ func Test_opt_reset_scroll() call delete('Xscroll') endfunc +" Test for the 'cdhome' option +func Test_opt_cdhome() + if has('unix') || has('vms') + throw 'Skipped: only works on non-Unix' + endif + + set cdhome& + call assert_equal(0, &cdhome) + set cdhome + + " This paragraph is copied from Test_cd_no_arg(). + let path = getcwd() + cd + call assert_equal($HOME, getcwd()) + call assert_notequal(path, getcwd()) + exe 'cd ' .. fnameescape(path) + call assert_equal(path, getcwd()) + + set cdhome& +endfunc + " vim: shiftwidth=2 sts=2 expandtab |