patch 8.0.0428: git and hg see new files after running tests

Problem:    Git and hg see new files after running tests. (Manuel Ortega)
Solution:   Add the generated file to .hgignore (or .gitignore). Delete the
            resulting verbose file. (Christian Brabandt)  Improve dependency
            on opt_test.vim.  Reset the 'more' option.
diff --git a/src/Makefile b/src/Makefile
index f945322..26658cc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2025,7 +2025,6 @@
 #
 scripttests:
 	$(MAKE) -f Makefile $(VIMTARGET)
-	$(MAKE) -f Makefile testdir/opt_test.vim
 	if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
 		cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \
 	fi
@@ -2034,9 +2033,6 @@
 	fi
 	cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
 
-testdir/opt_test.vim: option.c gen_opt_test.vim
-	./$(VIMTARGET) -u gen_opt_test.vim --noplugin --not-a-term
-
 # Run the tests with the GUI.  Assumes vim/gvim was already built
 testgui:
 	cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) GUI_FLAG=-g $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index b7fb15c..17c6028 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -221,3 +221,4 @@
 
 test60.out: test60.vim
 
+test_options.res: opt_test.vim
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
index 7c44024..1a98ebb 100644
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -94,6 +94,7 @@
 	-if exist test.log del test.log
 	-if exist messages del messages
 	-if exist benchmark.out del benchmark.out
+	-if exist opt_test.vim del opt_test.vim
 
 nolog:
 	-if exist test.log del test.log
@@ -127,3 +128,6 @@
 	@echo "$(VIMPROG)" > vimcmd
 	$(VIMPROG) -u NONE -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim
 	@del vimcmd
+
+opt_test.vim: ../option.c gen_opt_test.vim
+	$(VIMPROG) -u gen_opt_test.vim --noplugin --not-a-term
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index 61d77d2..8235b95 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -88,6 +88,7 @@
 	-@if exist viminfo $(DEL) viminfo
 	-@if exist test.log $(DEL) test.log
 	-@if exist messages $(DEL) messages
+	-@if exist opt_test.vim $(DEL) opt_test.vim
 
 .in.out:
 	-@if exist $*.ok $(CP) $*.ok test.ok
@@ -131,3 +132,5 @@
 	$(VIMPROG) -u NONE -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $<
 	@$(DEL) vimcmd
 
+opt_test.vim: ../option.c gen_opt_test.vim
+	$(VIMPROG) -u gen_opt_test.vim --noplugin --not-a-term
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index ac75e43..e44bd5c 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -55,7 +55,7 @@
 RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim $(NO_INITS) -s dotest.in
 
 clean:
-	-rm -rf *.out *.failed *.res *.rej *.orig test.log messages $(RM_ON_RUN) $(RM_ON_START) valgrind.*
+	-rm -rf *.out *.failed *.res *.rej *.orig opt_test.vim test.log messages $(RM_ON_RUN) $(RM_ON_START) valgrind.*
 
 test1.out: test1.in
 	-rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
@@ -140,3 +140,7 @@
 	@echo "$(RUN_GVIMTEST_WITH_GVIMRC)" > vimcmd
 	$(RUN_VIMTEST) -u NONE -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $<
 	@rm vimcmd
+
+opt_test.vim: ../option.c gen_opt_test.vim
+	$(VIMPROG) -u gen_opt_test.vim --noplugin --not-a-term
+
diff --git a/src/gen_opt_test.vim b/src/testdir/gen_opt_test.vim
similarity index 97%
rename from src/gen_opt_test.vim
rename to src/testdir/gen_opt_test.vim
index 677aa74..07a744b 100644
--- a/src/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -169,6 +169,10 @@
       for val in a[0]
 	call add(script, 'set ' . name . '=' . val)
 	call add(script, 'set ' . shortname . '=' . val)
+
+	if name == 'verbosefile' && !empty(val)
+	  call add(script, 'call delete("'. val. '")')
+	endif
       endfor
 
       " setting an option can only fail when it's implemented.
@@ -182,6 +186,10 @@
 
     call add(script, 'set ' . name . '&')
     call add(script, 'set ' . shortname . '&')
+
+    if name == 'more'
+      call add(script, 'set nomore')
+    endif
   endif
 endwhile
 
diff --git a/src/version.c b/src/version.c
index 962f5b8..983a425 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    428,
+/**/
     427,
 /**/
     426,