aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_options.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-12-25 11:31:54 +0800
committerzeertzjq <zeertzjq@outlook.com>2021-12-25 11:31:54 +0800
commit42cf76fd0ab2afe3ca633d0d6600c8a771731f57 (patch)
tree25d8bd975f6185db2fc65616ec28c045ff664b7f /src/nvim/testdir/test_options.vim
parent0d7a97224f28cdf47d7ecc80b6d300c8c67c0b29 (diff)
downloadrneovim-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/test_options.vim')
-rw-r--r--src/nvim/testdir/test_options.vim21
1 files changed, 21 insertions, 0 deletions
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