forked from aniani/vim
updated for version 7.4.647
Problem: After running the tests on MS-Windows many files differ from their originals as they were checked out. Solution: Use a temp directory for executing the tests. (Ken Takata, Taro Muraoka)
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -69,5 +69,7 @@ src/testdir/lua.vim
|
|||||||
src/testdir/small.vim
|
src/testdir/small.vim
|
||||||
src/testdir/tiny.vim
|
src/testdir/tiny.vim
|
||||||
src/testdir/test*.out
|
src/testdir/test*.out
|
||||||
|
src/testdir/test*.failed
|
||||||
src/testdir/test.log
|
src/testdir/test.log
|
||||||
|
src/testdir/dostmp/*
|
||||||
src/memfile_test
|
src/memfile_test
|
||||||
|
@@ -56,32 +56,64 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
|
|||||||
|
|
||||||
SCRIPTS32 = test50.out test70.out
|
SCRIPTS32 = test50.out test70.out
|
||||||
|
|
||||||
SCRIPTS_GUI = test16.out
|
SCRIPTS_GUI = test16.out
|
||||||
|
|
||||||
|
TEST_OUTFILES = $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) $(SCRIPTS_GUI)
|
||||||
|
DOSTMP = dostmp
|
||||||
|
DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test)
|
||||||
|
DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in)
|
||||||
|
|
||||||
.SUFFIXES: .in .out
|
.SUFFIXES: .in .out
|
||||||
|
|
||||||
nongui: fixff $(SCRIPTS16) $(SCRIPTS) report
|
nongui: nolog $(SCRIPTS16) $(SCRIPTS) report
|
||||||
|
|
||||||
small: report
|
small: nolog report
|
||||||
|
|
||||||
gui: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) report
|
gui: nolog $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) report
|
||||||
|
|
||||||
win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) report
|
win32: nolog $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) report
|
||||||
|
|
||||||
fixff:
|
# Copy the input files to dostmp, changing the fileformat to dos.
|
||||||
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
|
$(DOSTMP_INFILES): $(*B).in
|
||||||
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
|
if not exist $(DOSTMP)\NUL md $(DOSTMP)
|
||||||
dotest.in test60.ok test71.ok test74.ok test100.ok
|
if exist $@ del $@
|
||||||
|
$(VIMPROG) -u dos.vim --noplugin "+set ff=dos|f $@|wq" $(*B).in
|
||||||
|
|
||||||
|
# For each input file dostmp/test99.in run the tests.
|
||||||
|
# This moves test99.in to test99.in.bak temporarily.
|
||||||
|
$(TEST_OUTFILES): $(DOSTMP)\$(*B).in
|
||||||
|
-@if exist test.out DEL test.out
|
||||||
|
move $(*B).in $(*B).in.bak
|
||||||
|
copy $*.in $(*B).in
|
||||||
|
copy $(DOSTMP)\$(*B).in $(*B).in
|
||||||
|
copy $(*B).ok test.ok
|
||||||
|
$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $(*B).in
|
||||||
|
-@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out
|
||||||
|
-@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in
|
||||||
|
-@del X*
|
||||||
|
-@if exist test.ok del test.ok
|
||||||
|
-@if exist Xdir1 rd /s /q Xdir1
|
||||||
|
-@if exist Xfind rd /s /q Xfind
|
||||||
|
-@if exist viminfo del viminfo
|
||||||
|
$(VIMPROG) -u dos.vim --noplugin "+set ff=unix|f test.out|wq" \
|
||||||
|
$(DOSTMP)\$(*B).out
|
||||||
|
@diff test.out $*.ok & if errorlevel 1 \
|
||||||
|
( move /y test.out $*.failed \
|
||||||
|
& del $(DOSTMP)\$(*B).out \
|
||||||
|
& echo $* FAILED >> test.log ) \
|
||||||
|
else ( move /y test.out $*.out )
|
||||||
|
|
||||||
report:
|
report:
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo Test results:
|
@echo Test results:
|
||||||
@IF EXIST test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
|
@if exist test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
|
||||||
ELSE ( ECHO ALL DONE )
|
else ( echo ALL DONE )
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-del *.out
|
-del *.out
|
||||||
-del *.failed
|
-del *.failed
|
||||||
|
-if exist $(DOSTMP) rd /s /q $(DOSTMP)
|
||||||
|
-if exist test.in del test.in
|
||||||
-if exist test.ok del test.ok
|
-if exist test.ok del test.ok
|
||||||
-if exist small.vim del small.vim
|
-if exist small.vim del small.vim
|
||||||
-if exist tiny.vim del tiny.vim
|
-if exist tiny.vim del tiny.vim
|
||||||
@@ -92,24 +124,11 @@ clean:
|
|||||||
-if exist Xdir1 rd /s /q Xdir1
|
-if exist Xdir1 rd /s /q Xdir1
|
||||||
-if exist Xfind rd /s /q Xfind
|
-if exist Xfind rd /s /q Xfind
|
||||||
-if exist viminfo del viminfo
|
-if exist viminfo del viminfo
|
||||||
-del test.log
|
-if exist test.log del test.log
|
||||||
-if exist benchmark.out del benchmark.out
|
-if exist benchmark.out del benchmark.out
|
||||||
|
|
||||||
.in.out:
|
|
||||||
-if exist $*.failed del $*.failed
|
|
||||||
copy $*.ok test.ok
|
|
||||||
$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
|
|
||||||
@diff test.out $*.ok & if errorlevel 1 \
|
|
||||||
( move /y test.out $*.failed & echo $* FAILED >> test.log ) \
|
|
||||||
else ( move /y test.out $*.out )
|
|
||||||
-del X*
|
|
||||||
-del test.ok
|
|
||||||
-if exist Xdir1 rd /s /q Xdir1
|
|
||||||
-if exist Xfind rd /s /q Xfind
|
|
||||||
-if exist viminfo del viminfo
|
|
||||||
|
|
||||||
nolog:
|
nolog:
|
||||||
-del test.log
|
-if exist test.log del test.log
|
||||||
|
|
||||||
benchmark:
|
benchmark:
|
||||||
bench_re_freeze.out
|
bench_re_freeze.out
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
647,
|
||||||
/**/
|
/**/
|
||||||
646,
|
646,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user