test: fix problem of breaking user's viminfo (#10824)

Vim turns on 'compatible' as a side effect of using the -u command line
option. As a result, viminfo is not used. But that is not the case with
neovim. neovim requires the -i command line option to avoid breaking
user's viminfo.
This commit is contained in:
erw7 2019-08-22 12:06:14 +09:00 committed by Daniel Hahler
parent 86c182c9df
commit 3223dedfc3

View File

@ -101,13 +101,16 @@ test1.out: $(NVIM_PRG)
$(SCRIPTS): $(NVIM_PRG) test1.out
NO_PLUGINS = --noplugin --headless
NO_INITS = -U NONE $(NO_PLUGINS)
# In vim, if the -u command line option is specified, compatible is turned on
# and viminfo is not read. Unlike vim, neovim reads viminfo and requires the
# -i command line option.
NO_INITS = -U NONE -i NONE $(NO_PLUGINS)
# TODO: find a way to avoid changing the distributed files.
fixff:
-$(NVIM_PRG) -u unix.vim $(NO_INITS) "+argdo set ff=dos|upd" +q \
-$(NVIM_PRG) $(NO_INITS) -u unix.vim "+argdo set ff=dos|upd" +q \
*.in *.ok
-$(NVIM_PRG) -u unix.vim $(NO_INITS) "+argdo set ff=dos|upd" +q \
-$(NVIM_PRG) $(NO_INITS) -u unix.vim "+argdo set ff=dos|upd" +q \
dotest.in
RM_ON_RUN := test.out X* viminfo