To: vim_dev@googlegroups.com Subject: Patch 8.2.3136 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3136 Problem: No test for E187 and "No swap file". Solution: Add a test. (Dominique Pellé, closes #8540) Files: src/testdir/test_cd.vim, src/testdir/test_swap.vim *** ../vim-8.2.3135/src/testdir/test_cd.vim 2020-08-12 18:50:31.871655841 +0200 --- src/testdir/test_cd.vim 2021-07-10 17:57:41.539528924 +0200 *************** *** 1,6 **** --- 1,7 ---- " Test for :cd and chdir() source shared.vim + source check.vim func Test_cd_large_path() " This used to crash with a heap write overflow. *************** *** 177,182 **** --- 178,198 ---- quit! endfunc + func Test_cd_from_non_existing_dir() + CheckNotMSWindows + + let saveddir = getcwd() + call mkdir('Xdeleted_dir') + cd Xdeleted_dir + call delete(saveddir .. '/Xdeleted_dir', 'd') + + " Expect E187 as the current directory was deleted. + call assert_fails('pwd', 'E187:') + call assert_equal('', getcwd()) + cd - + call assert_equal(saveddir, getcwd()) + endfunc + func Test_cd_completion() call mkdir('XComplDir1', 'p') call mkdir('XComplDir2', 'p') *** ../vim-8.2.3135/src/testdir/test_swap.vim 2021-07-04 17:36:50.377399435 +0200 --- src/testdir/test_swap.vim 2021-07-10 17:57:41.539528924 +0200 *************** *** 574,577 **** --- 574,581 ---- augroup! test_swapchoice endfunc + func Test_no_swap_file() + call assert_equal("\nNo swap file", execute('swapname')) + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.3135/src/version.c 2021-07-10 13:15:35.295053013 +0200 --- src/version.c 2021-07-10 17:58:10.387482659 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3136, /**/ -- hundred-and-one symptoms of being an internet addict: 107. When using your phone you forget that you don't have to use your keyboard. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///