Skip to content

Commit 8fa4946

Browse files
committed
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)
1 parent f2057fd commit 8fa4946

File tree

3 files changed

+53
-30
lines changed

3 files changed

+53
-30
lines changed

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,7 @@ src/testdir/lua.vim
7171
src/testdir/small.vim
7272
src/testdir/tiny.vim
7373
src/testdir/test*.out
74+
src/testdir/test*.failed
7475
src/testdir/test.log
76+
src/testdir/dostmp/*
7577
src/memfile_test

src/testdir/Make_dos.mak

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,64 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
5656

5757
SCRIPTS32 = test50.out test70.out
5858

59-
SCRIPTS_GUI = test16.out
59+
SCRIPTS_GUI = test16.out
6060

61-
.SUFFIXES: .in .out
62-
63-
nongui: fixff $(SCRIPTS16) $(SCRIPTS) report
64-
65-
small: report
66-
67-
gui: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) report
61+
TEST_OUTFILES = $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) $(SCRIPTS_GUI)
62+
DOSTMP = dostmp
63+
DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test)
64+
DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in)
6865

69-
win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) report
66+
.SUFFIXES: .in .out
7067

71-
fixff:
72-
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
73-
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
74-
dotest.in test60.ok test71.ok test74.ok test100.ok
68+
nongui: nolog $(SCRIPTS16) $(SCRIPTS) report
69+
70+
small: nolog report
71+
72+
gui: nolog $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) report
73+
74+
win32: nolog $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) report
75+
76+
# Copy the input files to dostmp, changing the fileformat to dos.
77+
$(DOSTMP_INFILES): $(*B).in
78+
if not exist $(DOSTMP)\NUL md $(DOSTMP)
79+
if exist $@ del $@
80+
$(VIMPROG) -u dos.vim --noplugin "+set ff=dos|f $@|wq" $(*B).in
81+
82+
# For each input file dostmp/test99.in run the tests.
83+
# This moves test99.in to test99.in.bak temporarily.
84+
$(TEST_OUTFILES): $(DOSTMP)\$(*B).in
85+
-@if exist test.out DEL test.out
86+
move $(*B).in $(*B).in.bak
87+
copy $*.in $(*B).in
88+
copy $(DOSTMP)\$(*B).in $(*B).in
89+
copy $(*B).ok test.ok
90+
$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $(*B).in
91+
-@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out
92+
-@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in
93+
-@del X*
94+
-@if exist test.ok del test.ok
95+
-@if exist Xdir1 rd /s /q Xdir1
96+
-@if exist Xfind rd /s /q Xfind
97+
-@if exist viminfo del viminfo
98+
$(VIMPROG) -u dos.vim --noplugin "+set ff=unix|f test.out|wq" \
99+
$(DOSTMP)\$(*B).out
100+
@diff test.out $*.ok & if errorlevel 1 \
101+
( move /y test.out $*.failed \
102+
& del $(DOSTMP)\$(*B).out \
103+
& echo $* FAILED >> test.log ) \
104+
else ( move /y test.out $*.out )
75105

76106
report:
77107
@echo ""
78108
@echo Test results:
79-
@IF EXIST test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
80-
ELSE ( ECHO ALL DONE )
109+
@if exist test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
110+
else ( echo ALL DONE )
81111

82112
clean:
83113
-del *.out
84114
-del *.failed
115+
-if exist $(DOSTMP) rd /s /q $(DOSTMP)
116+
-if exist test.in del test.in
85117
-if exist test.ok del test.ok
86118
-if exist small.vim del small.vim
87119
-if exist tiny.vim del tiny.vim
@@ -92,24 +124,11 @@ clean:
92124
-if exist Xdir1 rd /s /q Xdir1
93125
-if exist Xfind rd /s /q Xfind
94126
-if exist viminfo del viminfo
95-
-del test.log
127+
-if exist test.log del test.log
96128
-if exist benchmark.out del benchmark.out
97129

98-
.in.out:
99-
-if exist $*.failed del $*.failed
100-
copy $*.ok test.ok
101-
$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
102-
@diff test.out $*.ok & if errorlevel 1 \
103-
( move /y test.out $*.failed & echo $* FAILED >> test.log ) \
104-
else ( move /y test.out $*.out )
105-
-del X*
106-
-del test.ok
107-
-if exist Xdir1 rd /s /q Xdir1
108-
-if exist Xfind rd /s /q Xfind
109-
-if exist viminfo del viminfo
110-
111130
nolog:
112-
-del test.log
131+
-if exist test.log del test.log
113132

114133
benchmark:
115134
bench_re_freeze.out

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
647,
744746
/**/
745747
646,
746748
/**/

0 commit comments

Comments
 (0)