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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202107101600.16AG0Hfw597410%40masaka.moolenaar.net.

Raspunde prin e-mail lui