Hi Taro,

2014/9/25 Thu 23:44:43 UTC+9 Taro MURAOKA wrote:
> It seems very nice!
> 
> Thank you Ken.
> 
> 
> 2014年9月25日木曜日 21時50分47秒 UTC+9 Ken Takata:
> > Hi Taro,
> > 
> > 2013/7/6 Sat 15:43:27 UTC+9 Taro MURAOKA wrote:
> > > Hi list.
> > > 
> > > 
> > > When using vim's mercurial repository on Windows,
> > > executing tests has some problems and is very very very stressfull.
> > > 
> > >   * converting 'ff' of *.ok and *.in causes messy status for hg.
> > >   * executing single test is failed often,
> > >     because of forgetting convert 'ff'.
> > >   * debugging and modifing tests are not easy.  too many steps are
> > >     required.
> > > 
> > > To resolve these problems, I have changed most part of
> > > src/testdir/Make_dos.mak.  What are changed:
> > > 
> > >   * Place converted files into temporary directory (dostmp).
> > >   * Set dependencies between input, temporary and output files.
> > >   * Use upper case letters for commands which derived from DOS.
> > > 
> > > As a result of these changes, we can execute tests very easily.
> > > 
> > >   $ nmake -f Make_dos.mak win32
> > >   $ nmake -f Make_dos.mak test87.out
> > >   $ hg status
> > >   (nothing changed, when test was succeeded)
> > > 
> > > Please check an attached patch.
> > > 
> > > 
> > > Best.
> > 
> > I think your patch is very useful, but I found an issue with it.
> > When I wanted to run a test again, I used to delete the output then run
> > the test.
> > E.g.:
> > 
> > $ nmake -f Make_dos.mak test87.out
> > $ del test87.out
> > $ nmake -f Make_dos.mak test87.out
> > 
> > This doesn't work after applying your patch.
> > (Actually, deleting dostmp\test87.out instead of test87.out works fine,
> > but it is a little bit confusing.)
> > 
> > Attached patch is an additional patch to the Taro's patch.
> > 
> > Regards,
> > Ken Takata

The patch improve_dos_test.diff conflicts with 7.4.497 and 7.4.498.
I have updated it.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent a3c4bdc712bab885d59b17fa456b818a4f54310c

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -71,5 +71,7 @@ src/testdir/lua.vim
 src/testdir/small.vim
 src/testdir/tiny.vim
 src/testdir/test*.out
+src/testdir/test*.failed
 src/testdir/test.log
+src/testdir/dostmp/*
 src/memfile_test
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -50,17 +50,53 @@ SCRIPTS =	test3.out test4.out test5.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
 
-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
+
+$(DOSTMP_INFILES): $(*B).in
+	IF NOT EXIST $(DOSTMP)\NUL MD $(DOSTMP)
+	IF EXIST $@ DEL $@
+	$(VIMPROG) -u dos.vim --noplugin "+set ff=dos|f $@|wq" $(*B).in
+
+$(DOSTMP_OUTFILES): $*.in
+	-@IF EXIST test.out DEL test.out
+	MOVE $(*B).in $(*B).in.bak
+	COPY $*.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 $@
+	-@IF EXIST $(*B).in.bak \
+		( DEL $(*B).in & MOVE $(*B).in.bak $(*B).in )
+	-@IF EXIST test.in DEL test.in
+	-@IF EXIST X* 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
+
+$(TEST_OUTFILES): $(DOSTMP)\$(*B).out
+	IF EXIST test.out DEL test.out
+	$(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 )
 
 fixff:
 	-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
@@ -68,47 +104,36 @@ fixff:
 		dotest.in test60.ok test71.ok test74.ok test100.ok
 
 report:
-	@echo ""
-	@echo Test results:
-	@IF EXIST test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
+	@ECHO ""
+	@ECHO Test results:
+	@IF EXIST test.log ( TYPE test.log & ECHO TEST FAILURE & EXIT /b 1 ) \
 		ELSE ( ECHO ALL DONE )
 
 clean:
-	-del *.out
-	-del *.failed
-	-if exist test.ok del test.ok
-	-if exist small.vim del small.vim
-	-if exist tiny.vim del tiny.vim
-	-if exist mbyte.vim del mbyte.vim
-	-if exist mzscheme.vim del mzscheme.vim
-	-if exist lua.vim del lua.vim
-	-del X*
-	-if exist Xdir1 rd /s /q Xdir1
-	-if exist Xfind rd /s /q Xfind
-	-if exist viminfo del viminfo
-	-del test.log
-	-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
+	-IF EXIST *.out DEL *.out
+	-IF EXIST *.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.log DEL test.log
+	-IF EXIST small.vim DEL small.vim
+	-IF EXIST tiny.vim DEL tiny.vim
+	-IF EXIST mbyte.vim DEL mbyte.vim
+	-IF EXIST mzscheme.vim DEL mzscheme.vim
+	-IF EXIST lua.vim DEL lua.vim
+	-IF EXIST X* DEL X*
+	-IF EXIST Xdir1 RD /s /q Xdir1
+	-IF EXIST Xfind RD /s /q Xfind
+	-IF EXIST viminfo DEL viminfo
+	-IF EXIST benchmark.out DEL benchmark.out
 
 nolog:
-	-del test.log
+	-DEL test.log
 
 benchmark:
 	bench_re_freeze.out
 
 bench_re_freeze.out: bench_re_freeze.vim
-	-if exist benchmark.out del benchmark.out
+	-IF EXIST benchmark.out DEL benchmark.out
 	$(VIMPROG) -u dos.vim -U NONE --noplugin $*.in
-	@IF EXIST benchmark.out ( type benchmark.out )
+	@IF EXIST benchmark.out ( TYPE benchmark.out )
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -70,24 +70,19 @@ win32:	nolog $(SCRIPTS16) $(SCRIPTS) $(S
 	IF EXIST $@ DEL $@
 	$(VIMPROG) -u dos.vim --noplugin "+set ff=dos|f $@|wq" $(*B).in
 
-$(DOSTMP_OUTFILES): $*.in
+$(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 $@
-	-@IF EXIST $(*B).in.bak \
-		( DEL $(*B).in & MOVE $(*B).in.bak $(*B).in )
-	-@IF EXIST test.in DEL test.in
+	-@IF EXIST test.out MOVE /y test.out $(DOSTMP)\$(*B).out
+	-@IF EXIST $(*B).in.bak MOVE /y $(*B).in.bak $(*B).in
 	-@IF EXIST X* 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
-
-$(TEST_OUTFILES): $(DOSTMP)\$(*B).out
-	IF EXIST test.out DEL test.out
 	$(VIMPROG) -u dos.vim --noplugin "+set ff=unix|f test.out|wq" \
 		$(DOSTMP)\$(*B).out
 	@diff test.out $*.ok & IF ERRORLEVEL 1 \

Raspunde prin e-mail lui