diff options
Diffstat (limited to 'src/nvim/testdir/test_autochdir.vim')
-rw-r--r-- | src/nvim/testdir/test_autochdir.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autochdir.vim b/src/nvim/testdir/test_autochdir.vim new file mode 100644 index 0000000000..f52e2e668a --- /dev/null +++ b/src/nvim/testdir/test_autochdir.vim @@ -0,0 +1,17 @@ +" Test 'autochdir' behavior + +if !exists("+autochdir") + finish +endif + +func Test_set_filename() + call test_autochdir() + set acd + new + w samples/Xtest + call assert_equal("Xtest", expand('%')) + call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', '')) + bwipe! + set noacd + call delete('samples/Xtest') +endfunc |