Mercurial > vim
view src/testdir/test_autochdir.vim @ 21184:2113e94dc726 v8.2.1143
patch 8.2.1143: Vim9: return type of remove() is any
Commit: https://github.com/vim/vim/commit/ad7c24932725b9ab37b65fe359a41f8ba3e3dfcf
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 5 20:55:29 2020 +0200
patch 8.2.1143: Vim9: return type of remove() is any
Problem: Vim9: return type of remove() is any.
Solution: Use the member type of the first argument, if known.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Jul 2020 21:00:05 +0200 |
parents | 26a04a556982 |
children | 08940efa6b4e |
line wrap: on
line source
" Test 'autochdir' behavior source check.vim CheckOption autochdir func Test_set_filename() let cwd = getcwd() call test_autochdir() set acd let s:li = [] autocmd DirChanged auto call add(s:li, "autocd") autocmd DirChanged auto call add(s:li, expand("<afile>")) new w samples/Xtest call assert_equal("Xtest", expand('%')) call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', '')) call assert_equal(["autocd", getcwd()], s:li) bwipe! au! DirChanged set noacd call chdir(cwd) call delete('samples/Xtest') endfunc