comparison src/testdir/test_arglist.vim @ 11680:c66d6dc92f53 v8.0.0723

patch 8.0.0723: arglist test fails if file name case is ignored commit https://github.com/vim/vim/commit/9b50bba643f8d1fcac91e11780da7d03d8995260 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 16 16:42:13 2017 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sun, 16 Jul 2017 16:45:03 +0200
parents f87c43fca41d
children 976b480ced9a
comparison
equal deleted inserted replaced
11679:4b93af584cd5 11680:c66d6dc92f53
244 call assert_equal(['a', 'b'], argv()) 244 call assert_equal(['a', 'b'], argv())
245 call assert_equal('b', expand('%:t')) 245 call assert_equal('b', expand('%:t'))
246 argedit a 246 argedit a
247 call assert_equal(['a', 'b', 'a'], argv()) 247 call assert_equal(['a', 'b', 'a'], argv())
248 call assert_equal('a', expand('%:t')) 248 call assert_equal('a', expand('%:t'))
249 " When file name case is ignored, an existing buffer with only case
250 " difference is re-used. Make sure they don't exist so the case is
251 " preserved.
252 bwipe! c
253 bwipe! d
249 argedit C D 254 argedit C D
250 call assert_equal('C', expand('%:t')) 255 call assert_equal('C', expand('%:t'))
251 call assert_equal(['a', 'b', 'a', 'C', 'D'], argv()) 256 call assert_equal(['a', 'b', 'a', 'C', 'D'], argv())
252 argedit c 257 argedit c
253 call assert_equal(['a', 'b', 'a', 'C', 'c', 'D'], argv()) 258 if has('fname_case')
259 call assert_equal(['a', 'b', 'a', 'C', 'c', 'D'], argv())
260 else
261 call assert_equal(['a', 'b', 'a', 'C', 'C', 'D'], argv())
262 endif
254 0argedit x 263 0argedit x
255 call assert_equal(['x', 'a', 'b', 'a', 'C', 'c', 'D'], argv()) 264 if has('fname_case')
265 call assert_equal(['x', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
266 else
267 call assert_equal(['x', 'a', 'b', 'a', 'C', 'C', 'D'], argv())
268 endif
256 enew! | set modified 269 enew! | set modified
257 call assert_fails('argedit y', 'E37:') 270 call assert_fails('argedit y', 'E37:')
258 argedit! y 271 argedit! y
259 call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'c', 'D'], argv()) 272 if has('fname_case')
260 %argd 273 call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
274 else
275 call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'C', 'D'], argv())
276 endif
277 %argd
278 bwipe! C
279 bwipe! D
261 endfunc 280 endfunc
262 281
263 " Test for the :argdelete command 282 " Test for the :argdelete command
264 func Test_argdelete() 283 func Test_argdelete()
265 call Reset_arglist() 284 call Reset_arglist()