mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.0723: arglist test fails if file name case is ignored
Problem: Arglist test fails if file name case is ignored. Solution: Wipe existing buffers, check for fname_case property.
This commit is contained in:
@@ -246,18 +246,37 @@ func Test_argedit()
|
|||||||
argedit a
|
argedit a
|
||||||
call assert_equal(['a', 'b', 'a'], argv())
|
call assert_equal(['a', 'b', 'a'], argv())
|
||||||
call assert_equal('a', expand('%:t'))
|
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
|
argedit C D
|
||||||
call assert_equal('C', expand('%:t'))
|
call assert_equal('C', expand('%:t'))
|
||||||
call assert_equal(['a', 'b', 'a', 'C', 'D'], argv())
|
call assert_equal(['a', 'b', 'a', 'C', 'D'], argv())
|
||||||
argedit c
|
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
|
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
|
enew! | set modified
|
||||||
call assert_fails('argedit y', 'E37:')
|
call assert_fails('argedit y', 'E37:')
|
||||||
argedit! y
|
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
|
%argd
|
||||||
|
bwipe! C
|
||||||
|
bwipe! D
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for the :argdelete command
|
" Test for the :argdelete command
|
||||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
723,
|
||||||
/**/
|
/**/
|
||||||
722,
|
722,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user