]> granicus.if.org Git - vim/commitdiff
patch 8.0.0723: arglist test fails if file name case is ignored v8.0.0723
authorBram Moolenaar <Bram@vim.org>
Sun, 16 Jul 2017 14:42:13 +0000 (16:42 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 16 Jul 2017 14:42:13 +0000 (16:42 +0200)
Problem:    Arglist test fails if file name case is ignored.
Solution:   Wipe existing buffers, check for fname_case property.

src/testdir/test_arglist.vim
src/version.c

index 1a0e4aff280909c21338742c0932657d4b8f5835..f75bad1c0989613f73ad64c73854f57c27937388 100644 (file)
@@ -246,18 +246,37 @@ func Test_argedit()
   argedit a
   call assert_equal(['a', 'b', 'a'], argv())
   call assert_equal('a', expand('%:t'))
+  " When file name case is ignored, an existing buffer with only case
+  " difference is re-used.  Make sure they don't exist so the case is
+  " preserved.
+  bwipe! c
+  bwipe! d
   argedit C D
   call assert_equal('C', expand('%:t'))
   call assert_equal(['a', 'b', 'a', 'C', 'D'], argv())
   argedit c
-  call assert_equal(['a', 'b', 'a', 'C', 'c', 'D'], argv())
+  if has('fname_case')
+    call assert_equal(['a', 'b', 'a', 'C', 'c', 'D'], argv())
+  else
+    call assert_equal(['a', 'b', 'a', 'C', 'C', 'D'], argv())
+  endif
   0argedit x
-  call assert_equal(['x', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
+  if has('fname_case')
+    call assert_equal(['x', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
+  else
+    call assert_equal(['x', 'a', 'b', 'a', 'C', 'C', 'D'], argv())
+  endif
   enew! | set modified
   call assert_fails('argedit y', 'E37:')
   argedit! y
-  call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
+  if has('fname_case')
+    call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
+  else
+    call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'C', 'D'], argv())
+  endif
   %argd
+  bwipe! C
+  bwipe! D
 endfunc
 
 " Test for the :argdelete command
index 91e6deda040fbfa1f13f04d0be54017d014bf373..1b2cc8a956f802f8a4574ab19d71e7c54add640f 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    723,
 /**/
     722,
 /**/