From a1ee06a0993ef8959cdcec61759b17aa68ee28bd Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 3 Feb 2018 11:54:59 +0100 Subject: test/oldtest: restore test_autochdir.vim We have a ported Lua version, but we should also keep the Vim version around to make merging easier. --- src/nvim/testdir/test_autochdir.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/nvim/testdir/test_autochdir.vim (limited to 'src') diff --git a/src/nvim/testdir/test_autochdir.vim b/src/nvim/testdir/test_autochdir.vim new file mode 100644 index 0000000000..05d69631c4 --- /dev/null +++ b/src/nvim/testdir/test_autochdir.vim @@ -0,0 +1,19 @@ +" Test 'autochdir' behavior + +if !exists("+autochdir") + finish +endif + +func Test_set_filename() + let cwd = getcwd() + 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 + exe 'cd ' . cwd + call delete('samples/Xtest') +endfunc -- cgit