patch 8.1.1846: inconsistently using GetVimCommand() and v:progpath
Problem: Inconsistently using GetVimCommand() and v:progpath. (Daniel
Hahler)
Solution: Use GetVimCommand(). (closes #4806)
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 2df0fe5..c6df183 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -1096,7 +1096,7 @@
endif
call writefile(['1a', 'foo', 'bar', '.', 'w! Xfile2', 'q!'], 'Xscript')
call writefile(['1', '2'], 'Xfile')
- call system(v:progpath .' -e -s < Xscript Xfile')
+ call system(GetVimCommand() .. ' -e -s < Xscript Xfile')
let a=readfile('Xfile2')
call assert_equal(['1', 'foo', 'bar', '2'], a)
@@ -1143,13 +1143,13 @@
" let shell = &shell
" let &shell = 'sh'
call writefile(['1', '2'], 'Xfile')
- let args = ' -u NONE -N -U NONE -i NONE --noplugins -X --not-a-term'
- call system(v:progpath . args . ' -c "%d" -c ":norm! ZZ" Xfile')
+ let args = ' -N -i NONE --noplugins -X --not-a-term'
+ call system(GetVimCommand() .. args .. ' -c "%d" -c ":norm! ZZ" Xfile')
let a = readfile('Xfile')
call assert_equal([], a)
" Test for ZQ
call writefile(['1', '2'], 'Xfile')
- call system(v:progpath . args . ' -c "%d" -c ":norm! ZQ" Xfile')
+ call system(GetVimCommand() . args . ' -c "%d" -c ":norm! ZQ" Xfile')
let a = readfile('Xfile')
call assert_equal(['1', '2'], a)