aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_normal.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-14 18:56:30 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-14 18:56:30 +0800
commit8a80ab27bd7b819f4c8b48976b641dab002f0247 (patch)
tree6c814df000273b50b5bb4fee3af43a6067e7d3f4 /src/nvim/testdir/test_normal.vim
parent046950f6309070d98ab5a3deeff9d00e079ccdd4 (diff)
downloadrneovim-8a80ab27bd7b819f4c8b48976b641dab002f0247.tar.gz
rneovim-8a80ab27bd7b819f4c8b48976b641dab002f0247.tar.bz2
rneovim-8a80ab27bd7b819f4c8b48976b641dab002f0247.zip
vim-patch:8.1.1846: inconsistently using GetVimCommand() and v:progpath
Problem: Inconsistently using GetVimCommand() and v:progpath. (Daniel Hahler) Solution: Use GetVimCommand(). (closes vim/vim#4806) https://github.com/vim/vim/commit/93344c2d707d9953f351c944e6a237c9916f69a3 Cherry-pick a change to test_profile.vim from patch 8.1.1544. Cherry-pick a change to test_vimscript.vim from patch 8.1.1826. Some of the args are no-op in Nvim, and `-i NONE` and `--headless` are already added by `GetVimCommand()`. I'll try to match the order of args in upstream, substituting `--not-a-term` with `--headless`.
Diffstat (limited to 'src/nvim/testdir/test_normal.vim')
-rw-r--r--src/nvim/testdir/test_normal.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim
index 5b7cf6fee5..a2de34de69 100644
--- a/src/nvim/testdir/test_normal.vim
+++ b/src/nvim/testdir/test_normal.vim
@@ -1118,7 +1118,7 @@ func Test_normal20_exmode()
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)
@@ -1171,13 +1171,13 @@ func Test_normal22_zet()
endfor
call writefile(['1', '2'], 'Xfile_Test_normal22_zet')
- let args = ' --headless -u NONE -N -U NONE -i NONE --noplugins'
- call system(v:progpath . args . ' -c "%d" -c ":norm! ZZ" Xfile_Test_normal22_zet')
+ let args = ' -N -i NONE --noplugins -X --headless'
+ call system(GetVimCommand() .. args .. ' -c "%d" -c ":norm! ZZ" Xfile_Test_normal22_zet')
let a = readfile('Xfile_Test_normal22_zet')
call assert_equal([], a)
" Test for ZQ
call writefile(['1', '2'], 'Xfile_Test_normal22_zet')
- call system(v:progpath . args . ' -c "%d" -c ":norm! ZQ" Xfile_Test_normal22_zet')
+ call system(GetVimCommand() . args . ' -c "%d" -c ":norm! ZQ" Xfile_Test_normal22_zet')
let a = readfile('Xfile_Test_normal22_zet')
call assert_equal(['1', '2'], a)