Mercurial > vim
comparison src/testdir/test_normal.vim @ 17698:131f1d8c5860 v8.1.1846
patch 8.1.1846: inconsistently using GetVimCommand() and v:progpath
commit https://github.com/vim/vim/commit/93344c2d707d9953f351c944e6a237c9916f69a3
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 14 21:12:05 2019 +0200
patch 8.1.1846: inconsistently using GetVimCommand() and v:progpath
Problem: Inconsistently using GetVimCommand() and v:progpath. (Daniel
Hahler)
Solution: Use GetVimCommand(). (closes #4806)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 14 Aug 2019 21:15:06 +0200 |
parents | 3dbff5d37520 |
children | 5e10ee16f4b4 |
comparison
equal
deleted
inserted
replaced
17697:1d0133ac3c3b | 17698:131f1d8c5860 |
---|---|
1094 " Reading from redirected file doesn't work on MS-Windows | 1094 " Reading from redirected file doesn't work on MS-Windows |
1095 return | 1095 return |
1096 endif | 1096 endif |
1097 call writefile(['1a', 'foo', 'bar', '.', 'w! Xfile2', 'q!'], 'Xscript') | 1097 call writefile(['1a', 'foo', 'bar', '.', 'w! Xfile2', 'q!'], 'Xscript') |
1098 call writefile(['1', '2'], 'Xfile') | 1098 call writefile(['1', '2'], 'Xfile') |
1099 call system(v:progpath .' -e -s < Xscript Xfile') | 1099 call system(GetVimCommand() .. ' -e -s < Xscript Xfile') |
1100 let a=readfile('Xfile2') | 1100 let a=readfile('Xfile2') |
1101 call assert_equal(['1', 'foo', 'bar', '2'], a) | 1101 call assert_equal(['1', 'foo', 'bar', '2'], a) |
1102 | 1102 |
1103 " clean up | 1103 " clean up |
1104 for file in ['Xfile', 'Xfile2', 'Xscript'] | 1104 for file in ['Xfile', 'Xfile2', 'Xscript'] |
1141 func Test_normal22_zet() | 1141 func Test_normal22_zet() |
1142 " Test for ZZ | 1142 " Test for ZZ |
1143 " let shell = &shell | 1143 " let shell = &shell |
1144 " let &shell = 'sh' | 1144 " let &shell = 'sh' |
1145 call writefile(['1', '2'], 'Xfile') | 1145 call writefile(['1', '2'], 'Xfile') |
1146 let args = ' -u NONE -N -U NONE -i NONE --noplugins -X --not-a-term' | 1146 let args = ' -N -i NONE --noplugins -X --not-a-term' |
1147 call system(v:progpath . args . ' -c "%d" -c ":norm! ZZ" Xfile') | 1147 call system(GetVimCommand() .. args .. ' -c "%d" -c ":norm! ZZ" Xfile') |
1148 let a = readfile('Xfile') | 1148 let a = readfile('Xfile') |
1149 call assert_equal([], a) | 1149 call assert_equal([], a) |
1150 " Test for ZQ | 1150 " Test for ZQ |
1151 call writefile(['1', '2'], 'Xfile') | 1151 call writefile(['1', '2'], 'Xfile') |
1152 call system(v:progpath . args . ' -c "%d" -c ":norm! ZQ" Xfile') | 1152 call system(GetVimCommand() . args . ' -c "%d" -c ":norm! ZQ" Xfile') |
1153 let a = readfile('Xfile') | 1153 let a = readfile('Xfile') |
1154 call assert_equal(['1', '2'], a) | 1154 call assert_equal(['1', '2'], a) |
1155 | 1155 |
1156 " clean up | 1156 " clean up |
1157 for file in ['Xfile'] | 1157 for file in ['Xfile'] |