aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-12-25 21:10:44 -0500
committerGitHub <noreply@github.com>2021-12-25 21:10:44 -0500
commit1dcdf86849d58d6ff5c2ca6728657e7305226a36 (patch)
tree019021929437d1bae0d27cfb24d312e616f40102 /src/nvim/testdir
parent8bc7c6fab94a56f034ed459038fa17918886d22e (diff)
parenta5d3dd9359cd727f7c2e89b9b3951d55df4acf5d (diff)
downloadrneovim-1dcdf86849d58d6ff5c2ca6728657e7305226a36.tar.gz
rneovim-1dcdf86849d58d6ff5c2ca6728657e7305226a36.tar.bz2
rneovim-1dcdf86849d58d6ff5c2ca6728657e7305226a36.zip
Merge pull request #16618 from zeertzjq/vim-8.2.3780
vim-patch:8.2.{3780,3784}: ":cd" works differently on MS-Windows
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/runtest.vim6
-rw-r--r--src/nvim/testdir/test_options.vim21
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