aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/Makefile')
-rw-r--r--src/nvim/testdir/Makefile40
1 files changed, 29 insertions, 11 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index 8b43d91e25..03b1bae28f 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -16,7 +16,6 @@ export TMPDIR := $(abspath ../../../Xtest-tmpdir)
SCRIPTS_DEFAULT = \
test42.out \
test48.out \
- test52.out \
test64.out \
ifneq ($(OS),Windows_NT)
@@ -25,6 +24,12 @@ ifneq ($(OS),Windows_NT)
endif
+ifeq ($(OS),Windows_NT)
+ FIXFF = fixff
+else
+ FIXFF =
+endif
+
SCRIPTS ?= $(SCRIPTS_DEFAULT)
# Tests using runtest.vim.
@@ -74,27 +79,39 @@ ifdef TESTNUM
SCRIPTS := test$(TESTNUM).out
endif
-nongui: nolog $(SCRIPTS) newtests report
+nongui: nolog $(FIXFF) $(SCRIPTS) newtests report
.gdbinit:
@echo "[OLDTEST-PREP] Setting up .gdbinit"
@echo 'set $$_exitcode = -1\nrun\nif $$_exitcode != -1\n quit\nend' > .gdbinit
report:
+ $(RUN_VIMTEST) $(NO_INITS) -u NONE -S summarize.vim messages
@echo
@echo 'Test results:'
- @/bin/sh -c "if test -f test.log; then \
- cat test.log; \
- echo TEST FAILURE; \
- exit 1; \
- else \
- echo ALL DONE; \
- fi"
+ @cat test_result.log
+ @/bin/sh -c "if test -f test.log; \
+ then echo TEST FAILURE; exit 1; \
+ else echo ALL DONE; \
+ fi"
test1.out: $(NVIM_PRG)
$(SCRIPTS): $(NVIM_PRG) test1.out
+NO_PLUGINS = --noplugin --headless
+# 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) $(NO_INITS) -u unix.vim "+argdo set ff=dos|upd" +q \
+ *.in *.ok
+ -$(NVIM_PRG) $(NO_INITS) -u unix.vim "+argdo set ff=dos|upd" +q \
+ dotest.in
+
RM_ON_RUN := test.out X* viminfo
RM_ON_START := test.ok
RUN_VIM := $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --headless --noplugin -s dotest.in
@@ -106,6 +123,7 @@ CLEAN_FILES := *.out \
*.orig \
*.tlog \
test.log \
+ test_result.log \
messages \
$(RM_ON_RUN) \
$(RM_ON_START) \
@@ -145,7 +163,7 @@ nolog:
# New style of tests uses Vim script with assert calls. These are easier
# to write and a lot easier to read and debug.
# Limitation: Only works with the +eval feature.
-RUN_VIMTEST = $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --headless --noplugin
+RUN_VIMTEST = $(TOOL) $(NVIM_PRG) -u unix.vim
newtests: newtestssilent
@/bin/sh -c "if test -f messages && grep -q 'FAILED' messages; then \
@@ -158,4 +176,4 @@ newtestssilent: $(NEW_TESTS)
@echo "[OLDTEST] Running" $*
@rm -rf $*.failed test.ok $(RM_ON_RUN)
@mkdir -p $(TMPDIR)
- @/bin/sh runnvim.sh $(ROOT) $(NVIM_PRG) $* $(RUN_VIMTEST) -u NONE -S runtest.vim $*.vim
+ @/bin/sh runnvim.sh $(ROOT) $(NVIM_PRG) $* $(RUN_VIMTEST) $(NO_INITS) -u NONE -S runtest.vim $*.vim