diff src/testdir/test_excmd.vim @ 24814:4c5eec1ef612 v8.2.2945

patch 8.2.2945: some buffer related code is not tested Commit: https://github.com/vim/vim/commit/59b262362f26b3aaea1eeb0078adc33eed59863e Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jun 5 20:59:22 2021 +0200 patch 8.2.2945: some buffer related code is not tested Problem: Some buffer related code is not tested. Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/8320)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Jun 2021 21:00:04 +0200
parents acd9220bdd0b
children 4c1b6f3eb96b
line wrap: on
line diff
--- a/src/testdir/test_excmd.vim
+++ b/src/testdir/test_excmd.vim
@@ -69,6 +69,14 @@ func Test_file_cmd()
   call assert_fails('3file', 'E474:')
   call assert_fails('0,0file', 'E474:')
   call assert_fails('0file abc', 'E474:')
+  if !has('win32')
+    " Change the name of the buffer to the same name
+    new Xfile1
+    file Xfile1
+    call assert_equal('Xfile1', @%)
+    call assert_equal('Xfile1', @#)
+    bw!
+  endif
 endfunc
 
 " Test for the :drop command