comparison src/testdir/test_diffmode.vim @ 11109:0adcfcf22036 v8.0.0442

patch 8.0.0442: patch shell command not well escaped commit https://github.com/vim/vim/commit/1ef73e33c9414eb02c229d8234aafd9d481a8856 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 9 19:21:30 2017 +0100 patch 8.0.0442: patch shell command not well escaped Problem: Patch shell command uses double quotes around the argument, which allows for $HOME to be expanded. (Etienne) Solution: Use single quotes on Unix. (closes #1543)
author Christian Brabandt <cb@256bit.org>
date Thu, 09 Mar 2017 19:30:05 +0100
parents ae45d497868f
children 081ed9efb5c0
comparison
equal deleted inserted replaced
11108:6c7a4a958393 11109:0adcfcf22036
316 . 316 .
317 saveas Xpatch 317 saveas Xpatch
318 bwipe! 318 bwipe!
319 new 319 new
320 call assert_fails('diffpatch Xpatch', 'E816:') 320 call assert_fails('diffpatch Xpatch', 'E816:')
321 call setline(1, ['1', '2', '3']) 321
322 diffpatch Xpatch 322 for name in ['Xpatch', 'Xpatch$HOME']
323 call assert_equal(['1', '2x', '3', '4'], getline(1, '$')) 323 call setline(1, ['1', '2', '3'])
324 if name != 'Xpatch'
325 call rename('Xpatch', name)
326 endif
327 exe 'diffpatch ' . escape(name, '$')
328 call assert_equal(['1', '2x', '3', '4'], getline(1, '$'))
329 if name != 'Xpatch'
330 call rename(name, 'Xpatch')
331 endif
332 bwipe!
333 endfor
334
324 call delete('Xpatch') 335 call delete('Xpatch')
325 bwipe! 336 bwipe!
326 endfunc 337 endfunc
327 338
328 func Test_diff_too_many_buffers() 339 func Test_diff_too_many_buffers()