Mercurial > vim
view src/testdir/test_autochdir.vim @ 14772:66e241c3a2f0 v8.1.0398
patch 8.1.0398: no test for -o and -O command line arguments
commit https://github.com/vim/vim/commit/8f4499b81612568b4964e8445d86e34e6d644b13
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 16 16:28:11 2018 +0200
patch 8.1.0398: no test for -o and -O command line arguments
Problem: No test for -o and -O command line arguments.
Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/3438)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 16 Sep 2018 16:30:06 +0200 |
parents | 03a6aeea2096 |
children | 90ab2d3ce11d |
line wrap: on
line source
" 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