patch 9.1.1525: tests: testdir/ is a bit messy

Problem:  tests: testdir is a bit messy
Solution: move test scripts into testdir/util/ directory

src/testdir/ has become a dumping ground mixing test cases with utility
functions. Let's fix this by moving all utility functions into the
testdir/util/ directory

Also a few related changes had to be done:
- Update Filelist
- update README.txt and mention the new directory layout
- fix shadowbuild by linking the util directory into the shadow dir

closes: #17677

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2025-07-07 20:53:55 +02:00
parent b0905e269d
commit eb380b991c
148 changed files with 235 additions and 229 deletions

View File

@ -184,64 +184,64 @@ SRC_ALL = \
src/winclip.c \ src/winclip.c \
src/window.c \ src/window.c \
src/xxd/xxd.c \ src/xxd/xxd.c \
src/testdir/gen_opt_test.vim \
src/testdir/README.txt \
src/testdir/Make_all.mak \
src/testdir/*.in \ src/testdir/*.in \
src/testdir/*.py \ src/testdir/*.py \
src/testdir/keycode_check.vim \ src/testdir/Make_all.mak \
src/testdir/keycode_check.json \ src/testdir/README.txt \
src/testdir/lsan-suppress.txt \
src/testdir/sautest/autoload/*.vim \
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
src/testdir/check.vim \
src/testdir/commondumps.vim \ src/testdir/commondumps.vim \
src/testdir/gui_init.vim \ src/testdir/crash/* \
src/testdir/gui_preinit.vim \ src/testdir/dumps/*.dump \
src/testdir/mouse.vim \ src/testdir/dumps/*.vim \
src/testdir/runtest.vim \ src/testdir/keycode_check.json \
src/testdir/screendump.vim \ src/testdir/keycode_check.vim \
src/testdir/setup.vim \ src/testdir/lsan-suppress.txt \
src/testdir/setup_gui.vim \
src/testdir/shared.vim \
src/testdir/vim9.vim \
src/testdir/script_util.vim \
src/testdir/summarize.vim \
src/testdir/term_util.vim \
src/testdir/view_util.vim \
src/testdir/viewdumps.vim \
src/testdir/test[0-9]*.ok \
src/testdir/test77a.ok \
src/testdir/test77a.com \
src/testdir/test_*.vim \
src/testdir/python2/*.py \ src/testdir/python2/*.py \
src/testdir/python3/*.py \ src/testdir/python3/*.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/testdir/pythonx/*.py \ src/testdir/pythonx/*.py \
src/testdir/pythonx/topmodule/__init__.py \ src/testdir/pythonx/topmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/__init__.py \ src/testdir/pythonx/topmodule/submodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py \ src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \ src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/testdir/pyxfile/*.py \ src/testdir/pyxfile/*.py \
src/testdir/dumps/*.dump \ src/testdir/ru_RU/LC_MESSAGES/Makefile \
src/testdir/dumps/*.vim \ src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.po \
src/testdir/runtest.vim \
src/testdir/samples/*.html \ src/testdir/samples/*.html \
src/testdir/samples/*.txt \ src/testdir/samples/*.txt \
src/testdir/samples/*.vim \ src/testdir/samples/*.vim \
src/testdir/samples/poc.zip \ src/testdir/samples/poc.zip \
src/testdir/samples/test000 \
src/testdir/samples/test.zip \ src/testdir/samples/test.zip \
src/testdir/samples/test000 \
src/testdir/samples/test_undo.txt.undo \ src/testdir/samples/test_undo.txt.undo \
src/testdir/samples/testa.zip \ src/testdir/samples/testa.zip \
src/testdir/color_ramp.vim \ src/testdir/sautest/autoload/*.vim \
src/testdir/silent.wav \ src/testdir/silent.wav \
src/testdir/popupbounce.vim \ src/testdir/test77a.com \
src/testdir/crash/* \ src/testdir/test77a.ok \
src/testdir/ru_RU/LC_MESSAGES/Makefile \ src/testdir/test[0-9]*.ok \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.po \ src/testdir/test_*.vim \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \ src/testdir/testluaplugin/lua/testluaplugin/*.lua \
src/testdir/window_manager.vim \ src/testdir/util/check.vim \
src/testdir/util/color_ramp.vim \
src/testdir/util/gen_opt_test.vim \
src/testdir/util/gui_init.vim \
src/testdir/util/gui_preinit.vim \
src/testdir/util/mouse.vim \
src/testdir/util/popupbounce.vim \
src/testdir/util/screendump.vim \
src/testdir/util/script_util.vim \
src/testdir/util/setup.vim \
src/testdir/util/setup_gui.vim \
src/testdir/util/shared.vim \
src/testdir/util/summarize.vim \
src/testdir/util/term_util.vim \
src/testdir/util/view_util.vim \
src/testdir/util/vim9.vim \
src/testdir/util/window_manager.vim \
src/testdir/viewdumps.vim \
src/proto.h \ src/proto.h \
src/protodef.h \ src/protodef.h \
src/proto/alloc.pro \ src/proto/alloc.pro \
@ -521,7 +521,7 @@ SRC_UNIX = \
src/proto/pty.pro \ src/proto/pty.pro \
src/pty.c \ src/pty.c \
src/testdir/Makefile \ src/testdir/Makefile \
src/testdir/unix.vim \ src/testdir/util/unix.vim \
src/toolcheck \ src/toolcheck \
src/vim_icon.xbm \ src/vim_icon.xbm \
src/vim_mask.xbm \ src/vim_mask.xbm \
@ -615,7 +615,7 @@ SRC_DOS = \
src/testdir/Make_dos.mak \ src/testdir/Make_dos.mak \
src/testdir/Make_mvc.mak \ src/testdir/Make_mvc.mak \
src/testdir/Make_ming.mak \ src/testdir/Make_ming.mak \
src/testdir/dos.vim \ src/testdir/util/dos.vim \
src/uninstall.c \ src/uninstall.c \
src/vim.rc \ src/vim.rc \
src/vim.manifest \ src/vim.manifest \
@ -668,7 +668,7 @@ SRC_AMI = \
src/os_amiga.h \ src/os_amiga.h \
src/proto/os_amiga.pro \ src/proto/os_amiga.pro \
src/testdir/Make_amiga.mak \ src/testdir/Make_amiga.mak \
src/testdir/amiga.vim \ src/testdir/util/amiga.vim \
src/xxd/Make_amiga.mak \ src/xxd/Make_amiga.mak \
# Source files for Haiku (also in the extra archive). # Source files for Haiku (also in the extra archive).
@ -699,7 +699,7 @@ SRC_VMS = \
src/os_vms_mms.c \ src/os_vms_mms.c \
src/proto/os_vms.pro \ src/proto/os_vms.pro \
src/testdir/Make_vms.mms \ src/testdir/Make_vms.mms \
src/testdir/vms.vim \ src/testdir/util/vms.vim \
src/xxd/Make_vms.mms \ src/xxd/Make_vms.mms \
vimtutor.com \ vimtutor.com \

View File

@ -69,7 +69,8 @@ endif
" Use the script for source code screendump testing. It sources other scripts, " Use the script for source code screendump testing. It sources other scripts,
" therefore we must "cd" there. " therefore we must "cd" there.
cd ../../src/testdir cd ../../src/testdir
source screendump.vim source util/screendump.vim
source util/term_util.vim
exe 'cd ' .. fnameescape(syntaxDir) exe 'cd ' .. fnameescape(syntaxDir)
" For these tests we need to be able to run terminal Vim with 256 colors. On " For these tests we need to be able to run terminal Vim with 256 colors. On

View File

@ -3022,6 +3022,7 @@ shadow: runtime pixmaps
../../testdir/ru_RU \ ../../testdir/ru_RU \
../../testdir/sautest \ ../../testdir/sautest \
../../testdir/samples \ ../../testdir/samples \
../../testdir/util \
../../testdir/dumps \ ../../testdir/dumps \
../../testdir/*.ok \ ../../testdir/*.ok \
../../testdir/testluaplugin \ ../../testdir/testluaplugin \

View File

@ -21,7 +21,7 @@ clean:
.in.out: .in.out:
copy $*.ok test.ok copy $*.ok test.ok
$(VIMPROG) -u amiga.vim -U NONE --noplugin --not-a-term -s dotest.in $*.in $(VIMPROG) -u util/amiga.vim -U NONE --noplugin --not-a-term -s dotest.in $*.in
diff test.out $*.ok diff test.out $*.ok
rename test.out $*.out rename test.out $*.out
-delete X#? ALL QUIET -delete X#? ALL QUIET

View File

@ -46,7 +46,7 @@ report:
@rem without the +eval feature test_result.log is a copy of test.log @rem without the +eval feature test_result.log is a copy of test.log
@if exist test.log ( copy /y test.log test_result.log > nul ) \ @if exist test.log ( copy /y test.log test_result.log > nul ) \
else ( echo No failures reported > test_result.log ) else ( echo No failures reported > test_result.log )
$(VIMPROG) -u NONE $(COMMON_ARGS) -S summarize.vim messages $(VIMPROG) -u NONE $(COMMON_ARGS) -S util\summarize.vim messages
-if exist starttime del starttime -if exist starttime del starttime
@echo. @echo.
@echo Test results: @echo Test results:
@ -105,7 +105,7 @@ tinytests: $(SCRIPTS_TINY_OUT)
$(DOSTMP)/%.in : %.in $(DOSTMP)/%.in : %.in
if not exist $(DOSTMP)\nul mkdir $(DOSTMP) if not exist $(DOSTMP)\nul mkdir $(DOSTMP)
if exist $(DOSTMP)\$< $(DEL) $(DOSTMP)\$< if exist $(DOSTMP)\$< $(DEL) $(DOSTMP)\$<
$(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=dos|f $@|wq" $< $(VIMPROG) -u util\dos.vim $(COMMON_ARGS) "+set ff=dos|f $@|wq" $<
# For each input file dostmp/test99.in run the tests. # For each input file dostmp/test99.in run the tests.
# This moves test99.in to test99.in.bak temporarily. # This moves test99.in to test99.in.bak temporarily.
@ -115,7 +115,7 @@ $(DOSTMP)/%.in : %.in
$(MV) $(notdir $<) $(notdir $<).bak > NUL $(MV) $(notdir $<) $(notdir $<).bak > NUL
$(CP) $(DOSTMP)\$(notdir $<) $(notdir $<) > NUL $(CP) $(DOSTMP)\$(notdir $<) $(notdir $<) > NUL
$(CP) $(basename $@).ok test.ok > NUL $(CP) $(basename $@).ok test.ok > NUL
$(VIMPROG) -u dos.vim $(COMMON_ARGS) -s dotest.in $(notdir $<) $(VIMPROG) -u util\dos.vim $(COMMON_ARGS) -s dotest.in $(notdir $<)
-@if exist test.out $(MV) test.out $(DOSTMP)\$@ > NUL -@if exist test.out $(MV) test.out $(DOSTMP)\$@ > NUL
-@if exist $(notdir $<).bak $(MV) $(notdir $<).bak $(notdir $<) > NUL -@if exist $(notdir $<).bak $(MV) $(notdir $<).bak $(notdir $<) > NUL
-@if exist test.ok $(DEL) test.ok -@if exist test.ok $(DEL) test.ok
@ -124,7 +124,7 @@ $(DOSTMP)/%.in : %.in
-@if exist XfakeHOME $(DELDIR) XfakeHOME -@if exist XfakeHOME $(DELDIR) XfakeHOME
-@del X* -@del X*
-@if exist viminfo del viminfo -@if exist viminfo del viminfo
$(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=unix|f test.out|wq" \ $(VIMPROG) -u util\dos.vim $(COMMON_ARGS) "+set ff=unix|f test.out|wq" \
$(DOSTMP)\$@ $(DOSTMP)\$@
@diff test.out $(basename $@).ok & if errorlevel 1 \ @diff test.out $(basename $@).ok & if errorlevel 1 \
( $(MV) test.out $(basename $@).failed > NUL \ ( $(MV) test.out $(basename $@).failed > NUL \
@ -154,10 +154,10 @@ test_gui.res: test_gui.vim
test_gui_init.res: test_gui_init.vim test_gui_init.res: test_gui_init.vim
@echo $(VIMPROG) > vimcmd @echo $(VIMPROG) > vimcmd
$(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $< $(VIMPROG) -u util\gui_preinit.vim -U util\gui_init.vim $(NO_PLUGINS) -S runtest.vim $<
@$(DEL) vimcmd @$(DEL) vimcmd
opt_test.vim: gen_opt_test.vim ../optiondefs.h ../../runtime/doc/options.txt opt_test.vim: util/gen_opt_test.vim ../optiondefs.h ../../runtime/doc/options.txt
$(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S $^ $(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S $^
@if test -f test.log; then \ @if test -f test.log; then \
cat test.log; \ cat test.log; \

View File

@ -40,7 +40,7 @@ report:
@rem without the +eval feature test_result.log is a copy of test.log @rem without the +eval feature test_result.log is a copy of test.log
@if exist test.log ( copy /y test.log test_result.log > nul ) \ @if exist test.log ( copy /y test.log test_result.log > nul ) \
else ( echo No failures reported > test_result.log ) else ( echo No failures reported > test_result.log )
$(VIMPROG) -u NONE $(COMMON_ARGS) -S summarize.vim messages $(VIMPROG) -u NONE $(COMMON_ARGS) -S util\summarize.vim messages
-if exist starttime del starttime -if exist starttime del starttime
@echo: @echo:
@echo Test results: @echo Test results:
@ -99,7 +99,7 @@ tinytests: $(SCRIPTS_TINY_OUT)
$(DOSTMP_INFILES): $(*B).in $(DOSTMP_INFILES): $(*B).in
if not exist $(DOSTMP)\NUL md $(DOSTMP) if not exist $(DOSTMP)\NUL md $(DOSTMP)
if exist $@ del $@ if exist $@ del $@
$(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=dos|f $@|wq" $(*B).in $(VIMPROG) -u util\dos.vim $(COMMON_ARGS) "+set ff=dos|f $@|wq" $(*B).in
# For each input file dostmp/test99.in run the tests. # For each input file dostmp/test99.in run the tests.
# This moves test99.in to test99.in.bak temporarily. # This moves test99.in to test99.in.bak temporarily.
@ -109,7 +109,7 @@ $(TEST_OUTFILES): $(DOSTMP)\$(*B).in
move $(*B).in $(*B).in.bak > nul move $(*B).in $(*B).in.bak > nul
copy $(DOSTMP)\$(*B).in $(*B).in > nul copy $(DOSTMP)\$(*B).in $(*B).in > nul
copy $(*B).ok test.ok > nul copy $(*B).ok test.ok > nul
$(VIMPROG) -u dos.vim $(COMMON_ARGS) -s dotest.in $(*B).in $(VIMPROG) -u util\dos.vim $(COMMON_ARGS) -s dotest.in $(*B).in
-@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out > nul -@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out > nul
-@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in > nul -@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in > nul
-@if exist test.ok del test.ok -@if exist test.ok del test.ok
@ -118,7 +118,7 @@ $(TEST_OUTFILES): $(DOSTMP)\$(*B).in
-@if exist XfakeHOME rd /s /q XfakeHOME -@if exist XfakeHOME rd /s /q XfakeHOME
-@del X* -@del X*
-@if exist viminfo del viminfo -@if exist viminfo del viminfo
$(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=unix|f test.out|wq" \ $(VIMPROG) -u util\dos.vim $(COMMON_ARGS) "+set ff=unix|f test.out|wq" \
$(DOSTMP)\$(*B).out $(DOSTMP)\$(*B).out
@diff test.out $*.ok & if errorlevel 1 \ @diff test.out $*.ok & if errorlevel 1 \
( move /y test.out $*.failed > nul \ ( move /y test.out $*.failed > nul \
@ -148,10 +148,10 @@ test_gui.res: test_gui.vim
test_gui_init.res: test_gui_init.vim test_gui_init.res: test_gui_init.vim
@echo $(VIMPROG) > vimcmd @echo $(VIMPROG) > vimcmd
$(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim $(VIMPROG) -u util\gui_preinit.vim -U util\gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim
@del vimcmd @del vimcmd
opt_test.vim: gen_opt_test.vim ../optiondefs.h ../../runtime/doc/options.txt opt_test.vim: util/gen_opt_test.vim ../optiondefs.h ../../runtime/doc/options.txt
$(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S $** $(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S $**
@if exist test.log ( type test.log & exit /b 1 ) @if exist test.log ( type test.log & exit /b 1 )

View File

@ -56,7 +56,7 @@ GUI_OPTION = -g
-@ write sys$output " "$*" " -@ write sys$output " "$*" "
-@ write sys$output "-----------------------------------------------" -@ write sys$output "-----------------------------------------------"
-@ !run the test -@ !run the test
-@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in -@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u util/vms.vim --noplugin -s dotest.in $*.in
-@ !analyse the result -@ !analyse the result
-@ directory /size/date test.out -@ directory /size/date test.out
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename/nolog test.out $*.out -@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename/nolog test.out $*.out
@ -89,9 +89,9 @@ nolog :
-@ write sys$output "-----------------------------------------------" -@ write sys$output "-----------------------------------------------"
-@ write sys$output "MAKE_VMS.MMS options:" -@ write sys$output "MAKE_VMS.MMS options:"
-@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" " -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
-@ write sys$output "Default vimrc file is VMS.VIM:" -@ write sys$output "Default vimrc file is util/VMS.VIM:"
-@ write sys$output "-----------------------------------------------" -@ write sys$output "-----------------------------------------------"
-@ type VMS.VIM -@ type util/VMS.VIM
clean : clean :
-@ if "''F$SEARCH("*.out")'" .NES. "" then delete/noconfirm/nolog *.out.* -@ if "''F$SEARCH("*.out")'" .NES. "" then delete/noconfirm/nolog *.out.*

View File

@ -21,7 +21,7 @@ REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C a
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$* # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$*
# To execute one test, e.g. in gdb, use something like this: # To execute one test, e.g. in gdb, use something like this:
# run -f -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_name.vim # run -f -u util/unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_name.vim
default: nongui default: nongui
@ -48,7 +48,7 @@ report:
then cp test.log test_result.log; \ then cp test.log test_result.log; \
else echo No failures reported > test_result.log; \ else echo No failures reported > test_result.log; \
fi" fi"
$(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages $(REDIR_TEST_TO_NULL) $(VIMPROG) -u NONE $(NO_INITS) -S util/summarize.vim messages $(REDIR_TEST_TO_NULL)
@rm -f starttime @rm -f starttime
@echo @echo
@echo 'Test results:' @echo 'Test results:'
@ -87,7 +87,7 @@ test_vim9:
RM_ON_RUN = test.out X* viminfo RM_ON_RUN = test.out X* viminfo
RM_ON_START = test.ok benchmark.out RM_ON_START = test.ok benchmark.out
RUN_VIMPROG = VIMRUNTIME=$(SCRIPTSOURCE) $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim $(NO_INITS) -s dotest.in RUN_VIMPROG = VIMRUNTIME=$(SCRIPTSOURCE) $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u util/unix.vim $(NO_INITS) -s dotest.in
# Delete files that may interfere with running tests. This includes some files # Delete files that may interfere with running tests. This includes some files
# that may result from working on the tests, not only from running them. # that may result from working on the tests, not only from running them.
@ -141,7 +141,7 @@ tinytests: $(SCRIPTS_TINY_OUT)
# to write and a lot easier to read and debug. # to write and a lot easier to read and debug.
# Limitation: Only works with the +eval feature. # Limitation: Only works with the +eval feature.
# Add --gui-dialog-file to avoid getting stuck in a dialog. # Add --gui-dialog-file to avoid getting stuck in a dialog.
RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE) $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim --gui-dialog-file guidialog RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE) $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u util/unix.vim --gui-dialog-file guidialog
newtests: newtestssilent newtests: newtestssilent
@/bin/sh -c "if test -f messages; then cat messages; fi" @/bin/sh -c "if test -f messages; then cat messages; fi"
@ -174,13 +174,13 @@ test_gui_init.res: test_gui_init.vim
@echo "$(VIMPROG)" > vimcmd @echo "$(VIMPROG)" > vimcmd
@echo "$(RUN_GVIMTEST_WITH_GVIMRC)" >> vimcmd @echo "$(RUN_GVIMTEST_WITH_GVIMRC)" >> vimcmd
if test -n "$${ASAN_OPTIONS}"; then \ if test -n "$${ASAN_OPTIONS}"; then \
ASAN_OPTIONS="$${ASAN_OPTIONS}_$*" UBSAN_OPTIONS="$${UBSAN_OPTIONS}_$*" $(RUN_VIMTEST) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $< ; \ ASAN_OPTIONS="$${ASAN_OPTIONS}_$*" UBSAN_OPTIONS="$${UBSAN_OPTIONS}_$*" $(RUN_VIMTEST) -u util/gui_preinit.vim -U util/gui_init.vim $(NO_PLUGINS) -S runtest.vim $< ; \
else \ else \
$(RUN_VIMTEST) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $< ; \ $(RUN_VIMTEST) -u util/gui_preinit.vim -U util/gui_init.vim $(NO_PLUGINS) -S runtest.vim $< ; \
fi fi
@rm vimcmd @rm vimcmd
GEN_OPT_DEPS = gen_opt_test.vim ../optiondefs.h ../../runtime/doc/options.txt GEN_OPT_DEPS = util/gen_opt_test.vim ../optiondefs.h ../../runtime/doc/options.txt
opt_test.vim: $(GEN_OPT_DEPS) opt_test.vim: $(GEN_OPT_DEPS)
if test -n "$${ASAN_OPTIONS}"; then \ if test -n "$${ASAN_OPTIONS}"; then \

View File

@ -1,5 +1,8 @@
This directory contains tests for various Vim features. This directory contains test cases for various Vim features.
The auxiliary functions to perform the tests are in the util/ folder.
For testing an indent script see runtime/indent/testdir/README.txt. For testing an indent script see runtime/indent/testdir/README.txt.
For testing a syntax script see runtime/syntax/testdir/README.txt.
If it makes sense, add a new test method to an already existing file. You may If it makes sense, add a new test method to an already existing file. You may
want to separate it from other tests with comment lines. want to separate it from other tests with comment lines.

View File

@ -101,13 +101,13 @@ endif
set shellslash set shellslash
" Common with all tests on all systems. " Common with all tests on all systems.
source setup.vim source util/setup.vim
" Needed for RunningWithValgrind(). " Needed for RunningWithValgrind().
source shared.vim source util/shared.vim
" Needed for the various Check commands " Needed for the various Check commands
source check.vim source util/check.vim
" For consistency run all tests with 'nocompatible' set. " For consistency run all tests with 'nocompatible' set.
" This also enables use of line continuation. " This also enables use of line continuation.

View File

@ -1,7 +1,7 @@
" Tests for autocommands " Tests for autocommands
source screendump.vim source util/screendump.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func s:cleanup_buffers() abort func s:cleanup_buffers() abort
for bnr in range(1, bufnr('$')) for bnr in range(1, bufnr('$'))

View File

@ -4,7 +4,7 @@
CheckNotGui CheckNotGui
CheckFeature balloon_eval_term CheckFeature balloon_eval_term
source screendump.vim source util/screendump.vim
let s:common_script =<< trim [CODE] let s:common_script =<< trim [CODE]
call setline(1, ["one one one", "two tXo two", "three three three"]) call setline(1, ["one one one", "two tXo two", "three three three"])

View File

@ -1,6 +1,6 @@
" Tests for the Blob types " Tests for the Blob types
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func TearDown() func TearDown()
" Run garbage collection after every test " Run garbage collection after every test

View File

@ -6,7 +6,7 @@
" Test_breakindent08()) " Test_breakindent08())
CheckOption breakindent CheckOption breakindent
source screendump.vim source util/screendump.vim
func SetUp() func SetUp()
let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP" let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP"

View File

@ -1,6 +1,6 @@
" Tests for setbufline(), getbufline(), appendbufline(), deletebufline() " Tests for setbufline(), getbufline(), appendbufline(), deletebufline()
source screendump.vim source util/screendump.vim
func Test_setbufline_getbufline() func Test_setbufline_getbufline()
" similar to Test_set_get_bufline() " similar to Test_set_get_bufline()

View File

@ -3,7 +3,7 @@
" When +channel is supported then +job is too, so we don't check for that. " When +channel is supported then +job is too, so we don't check for that.
CheckFeature channel CheckFeature channel
source screendump.vim source util/screendump.vim
let s:python = PythonProg() let s:python = PythonProg()
if s:python == '' if s:python == ''

View File

@ -8,7 +8,7 @@ endif
CheckFeature clientserver CheckFeature clientserver
source shared.vim source util/shared.vim
func Check_X11_Connection() func Check_X11_Connection()
if has('x11') if has('x11')

View File

@ -1,6 +1,6 @@
" Tests for clipmethod " Tests for clipmethod
source window_manager.vim source util/window_manager.vim
CheckFeature clipboard_working CheckFeature clipboard_working
CheckFeature xterm_clipboard CheckFeature xterm_clipboard
@ -123,7 +123,7 @@ func Test_clipreset_switches()
let l:lines =<< trim END let l:lines =<< trim END
set cpm=x11 set cpm=x11
source shared.vim source util/shared.vim
func Test() func Test()
clipreset clipreset

View File

@ -1,7 +1,7 @@
" Tests for editing the command line. " Tests for editing the command line.
source screendump.vim source util/screendump.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func SetUp() func SetUp()
func SaveLastScreenLine() func SaveLastScreenLine()

View File

@ -1,6 +1,6 @@
" Tests for editing the command line. " Tests for editing the command line.
source screendump.vim source util/screendump.vim
func Test_getcmdwintype() func Test_getcmdwintype()
call feedkeys("q/:let a = getcmdwintype()\<CR>:q\<CR>", 'x!') call feedkeys("q/:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')

View File

@ -2,7 +2,7 @@
CheckFeature conceal CheckFeature conceal
source screendump.vim source util/screendump.vim
func Test_conceal_two_windows() func Test_conceal_two_windows()
CheckScreendump CheckScreendump

View File

@ -1,5 +1,5 @@
" Some tests, that used to crash Vim " Some tests, that used to crash Vim
source screendump.vim source util/screendump.vim
CheckScreendump CheckScreendump

View File

@ -1,6 +1,6 @@
" Test for cursorline and cursorlineopt " Test for cursorline and cursorlineopt
source screendump.vim source util/screendump.vim
func s:screen_attr(lnum) abort func s:screen_attr(lnum) abort
return map(range(1, 8), 'screenattr(a:lnum, v:val)') return map(range(1, 8), 'screenattr(a:lnum, v:val)')

View File

@ -1,6 +1,6 @@
" Tests for the Vim script debug commands " Tests for the Vim script debug commands
source screendump.vim source util/screendump.vim
CheckRunVimInTerminal CheckRunVimInTerminal

View File

@ -1,6 +1,6 @@
" Test for delete(). " Test for delete().
source screendump.vim source util/screendump.vim
func Test_file_delete() func Test_file_delete()
split Xfdelfile split Xfdelfile

View File

@ -1,6 +1,6 @@
" Tests for diff mode " Tests for diff mode
source screendump.vim source util/screendump.vim
func Test_diff_fold_sync() func Test_diff_fold_sync()
enew! enew!

View File

@ -4,7 +4,7 @@ if !has('gui_running') && has('unix')
set term=ansi set term=ansi
endif endif
source screendump.vim source util/screendump.vim
func Test_display_foldcolumn() func Test_display_foldcolumn()
CheckFeature folding CheckFeature folding

View File

@ -4,7 +4,7 @@ if exists("+t_kD")
let &t_kD="[3;*~" let &t_kD="[3;*~"
endif endif
source screendump.vim source util/screendump.vim
" Needs to come first until the bug in getchar() is " Needs to come first until the bug in getchar() is
" fixed: https://groups.google.com/d/msg/vim_dev/fXL9yme4H4c/bOR-U6_bAQAJ " fixed: https://groups.google.com/d/msg/vim_dev/fXL9yme4H4c/bOR-U6_bAQAJ

View File

@ -1,7 +1,7 @@
" Tests for various eval things. " Tests for various eval things.
source shared.vim source util/shared.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
function s:foo() abort function s:foo() abort
try try

View File

@ -1,6 +1,6 @@
" Tests for various Ex commands. " Tests for various Ex commands.
source screendump.vim source util/screendump.vim
func Test_ex_delete() func Test_ex_delete()
new new

View File

@ -1,6 +1,6 @@
" test execute() " test execute()
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func NestedEval() func NestedEval()
let nested = execute('echo "nested\nlines"') let nested = execute('echo "nested\nlines"')

View File

@ -1,6 +1,6 @@
" Tests for the exists() function " Tests for the exists() function
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_exists() func Test_exists()
augroup myagroup augroup myagroup

View File

@ -1,6 +1,6 @@
" Tests for expressions. " Tests for expressions.
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_equal() func Test_equal()
let base = {} let base = {}

View File

@ -1,6 +1,6 @@
" Test filter() and map() " Test filter() and map()
import './vim9.vim' as v9 import './util/vim9.vim' as v9
" list with expression string " list with expression string
func Test_filter_map_list_expr_string() func Test_filter_map_list_expr_string()

View File

@ -1,6 +1,6 @@
" Test findfile() and finddir() " Test findfile() and finddir()
import './vim9.vim' as v9 import './util/vim9.vim' as v9
let s:files = [ 'Xfinddir1/foo', let s:files = [ 'Xfinddir1/foo',
\ 'Xfinddir1/bar', \ 'Xfinddir1/bar',

View File

@ -1,6 +1,6 @@
" test float functions " test float functions
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_abs() func Test_abs()
call assert_equal('1.23', string(abs(1.23))) call assert_equal('1.23', string(abs(1.23)))

View File

@ -1,6 +1,6 @@
" Test for folding " Test for folding
source screendump.vim source util/screendump.vim
func PrepIndent(arg) func PrepIndent(arg)
return [a:arg] + repeat(["\t".a:arg], 5) return [a:arg] + repeat(["\t".a:arg], 5)

View File

@ -1,6 +1,6 @@
" Tests for expressions. " Tests for expressions.
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_printf_pos_misc() func Test_printf_pos_misc()
let lines =<< trim END let lines =<< trim END

View File

@ -1,7 +1,7 @@
" Tests for various functions. " Tests for various functions.
source screendump.vim source util/screendump.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
" Must be done first, since the alternate buffer must be unset. " Must be done first, since the alternate buffer must be unset.
func Test_00_bufexists() func Test_00_bufexists()

View File

@ -1,6 +1,6 @@
" Test glob2regpat() " Test glob2regpat()
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_glob2regpat_invalid() func Test_glob2regpat_invalid()
call assert_equal('^1\.33$', glob2regpat(1.33)) call assert_equal('^1\.33$', glob2regpat(1.33))

View File

@ -2,7 +2,7 @@
CheckCanRunGui CheckCanRunGui
source setup_gui.vim source util/setup_gui.vim
func Setup() func Setup()
call GUISetUpCommon() call GUISetUpCommon()

View File

@ -3,7 +3,7 @@
CheckCanRunGui CheckCanRunGui
source setup_gui.vim source util/setup_gui.vim
func Setup() func Setup()
call GUISetUpCommon() call GUISetUpCommon()

View File

@ -1,6 +1,6 @@
" Tests for :help " Tests for :help
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_help_restore_snapshot() func Test_help_restore_snapshot()
help help

View File

@ -1,8 +1,8 @@
" Tests for ":highlight" and highlighting. " Tests for ":highlight" and highlighting.
source screendump.vim source util/screendump.vim
source script_util.vim source util/script_util.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func ClearDict(d) func ClearDict(d)
for k in keys(a:d) for k in keys(a:d)

View File

@ -1,6 +1,6 @@
" Test for v:hlsearch " Test for v:hlsearch
source screendump.vim source util/screendump.vim
func Test_hlsearch() func Test_hlsearch()
new new

View File

@ -1,6 +1,6 @@
" Test for 'iminsert' " Test for 'iminsert'
import './vim9.vim' as v9 import './util/vim9.vim' as v9
let s:imactivatefunc_called = 0 let s:imactivatefunc_called = 0
let s:imstatusfunc_called = 0 let s:imstatusfunc_called = 0

View File

@ -1,7 +1,7 @@
" Test for insert completion " Test for insert completion
source screendump.vim source util/screendump.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
" Test for insert expansion " Test for insert expansion
func Test_ins_complete() func Test_ins_complete()

View File

@ -1,6 +1,6 @@
" Test for lambda and closure " Test for lambda and closure
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_lambda_feature() func Test_lambda_feature()
call assert_equal(1, has('lambda')) call assert_equal(1, has('lambda'))

View File

@ -1,6 +1,6 @@
" Tests for the :let command. " Tests for the :let command.
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_let() func Test_let()
" Test to not autoload when assigning. It causes internal error. " Test to not autoload when assigning. It causes internal error.

View File

@ -1,6 +1,6 @@
" Tests for 'listchars' display with 'list' and :list " Tests for 'listchars' display with 'list' and :list
source screendump.vim source util/screendump.vim
func Check_listchars(expected, end_lnum, end_scol = -1, leftcol = 0) func Check_listchars(expected, end_lnum, end_scol = -1, leftcol = 0)
if a:leftcol > 0 if a:leftcol > 0

View File

@ -1,7 +1,7 @@
" Tests for the List and Dict types " Tests for the List and Dict types
scriptencoding utf-8 scriptencoding utf-8
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func TearDown() func TearDown()
" Run garbage collection after every test " Run garbage collection after every test

View File

@ -6,7 +6,7 @@ scriptencoding latin1
CheckOption linebreak CheckOption linebreak
CheckFeature conceal CheckFeature conceal
source screendump.vim source util/screendump.vim
function s:screen_lines(lnum, width) abort function s:screen_lines(lnum, width) abort
return ScreenLines(a:lnum, a:width) return ScreenLines(a:lnum, a:width)

View File

@ -7,7 +7,7 @@ CheckOption linebreak
CheckFeature conceal CheckFeature conceal
CheckFeature signs CheckFeature signs
source screendump.vim source util/screendump.vim
func s:screen_lines(lnum, width) abort func s:screen_lines(lnum, width) abort
return ScreenLines(a:lnum, a:width) return ScreenLines(a:lnum, a:width)

View File

@ -1,7 +1,7 @@
" Tests for mappings and abbreviations " Tests for mappings and abbreviations
source screendump.vim source util/screendump.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_abbreviation() func Test_abbreviation()
new new

View File

@ -1,7 +1,7 @@
" Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(), " Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(),
" matchaddpos(), matcharg(), matchdelete(), and setmatches(). " matchaddpos(), matcharg(), matchdelete(), and setmatches().
source screendump.vim source util/screendump.vim
function Test_match() function Test_match()
highlight MyGroup1 term=bold ctermbg=red guibg=red highlight MyGroup1 term=bold ctermbg=red guibg=red

View File

@ -2,7 +2,7 @@
CheckFeature menu CheckFeature menu
source screendump.vim source util/screendump.vim
func Test_load_menu() func Test_load_menu()
try try

View File

@ -1,6 +1,6 @@
" Tests for :messages, :echomsg, :echoerr " Tests for :messages, :echomsg, :echoerr
source screendump.vim source util/screendump.vim
func Test_messages() func Test_messages()
let oldmore = &more let oldmore = &more

View File

@ -4,7 +4,7 @@
CheckNotGui CheckNotGui
CheckUnix CheckUnix
source mouse.vim source util/mouse.vim
" Test for modeless characterwise selection (single click) " Test for modeless characterwise selection (single click)
func Test_modeless_characterwise_selection() func Test_modeless_characterwise_selection()

View File

@ -1,6 +1,6 @@
" Test the ":move" command. " Test the ":move" command.
source screendump.vim source util/screendump.vim
func Test_move() func Test_move()
enew! enew!

View File

@ -2,7 +2,7 @@
" Most of this works the same in Windows GUI as well as Windows console. " Most of this works the same in Windows GUI as well as Windows console.
CheckMSWindows CheckMSWindows
source mouse.vim source util/mouse.vim
" Helper function for sending a grouped sequence of low level key presses " Helper function for sending a grouped sequence of low level key presses
" The modifier key(s) can be included as VK Key Codes in the sequence " The modifier key(s) can be included as VK Key Codes in the sequence

View File

@ -876,7 +876,7 @@ func Nb_quit_with_conn(port)
call delete("Xnetbeans") call delete("Xnetbeans")
call writefile([], "Xnetbeans", 'D') call writefile([], "Xnetbeans", 'D')
let after =<< trim END let after =<< trim END
source shared.vim source util/shared.vim
set cpo&vim set cpo&vim
func ReadXnetbeans() func ReadXnetbeans()

View File

@ -1,7 +1,7 @@
" Test for various Normal mode commands " Test for various Normal mode commands
import './vim9.vim' as v9 import './util/vim9.vim' as v9
source screendump.vim source util/screendump.vim
func Setup_NewWindow() func Setup_NewWindow()
10new 10new

View File

@ -1,6 +1,6 @@
" Test for 'number' and 'relativenumber' " Test for 'number' and 'relativenumber'
source screendump.vim source util/screendump.vim
func s:screen_lines(start, end) abort func s:screen_lines(start, end) abort
return ScreenLines([a:start, a:end], 8) return ScreenLines([a:start, a:end], 8)

View File

@ -340,12 +340,12 @@ func Test_set_completion()
" Expand directories. " Expand directories.
call feedkeys(":set cdpath=./\<C-A>\<C-B>\"\<CR>", 'tx') call feedkeys(":set cdpath=./\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match(' ./samples/ ', @:) call assert_match(' ./samples/ ', @:)
call assert_notmatch(' ./summarize.vim ', @:) call assert_notmatch(' ./util/summarize.vim ', @:)
set cdpath& set cdpath&
" Expand files and directories. " Expand files and directories.
call feedkeys(":set tags=./\<C-A>\<C-B>\"\<CR>", 'tx') call feedkeys(":set tags=./\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match(' ./samples/.* ./summarize.vim', @:) call assert_match(' ./samples/.* ./test10.in', @:)
call feedkeys(":set tags=./\\\\ dif\<C-A>\<C-B>\"\<CR>", 'tx') call feedkeys(":set tags=./\\\\ dif\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"set tags=./\\ diff diffexpr diffopt', @:) call assert_equal('"set tags=./\\ diff diffexpr diffopt', @:)

View File

@ -1,7 +1,7 @@
" Test for options " Test for options
" opt_test.vim is generated from src/optiondefs.h and runtime/doc/options.txt " opt_test.vim is generated from src/optiondefs.h and runtime/doc/options.txt
" using gen_opt_test.vim " using util/gen_opt_test.vim
if filereadable('opt_test.vim') if filereadable('opt_test.vim')
source opt_test.vim source opt_test.vim
else else

View File

@ -4,7 +4,7 @@ if !has('gui_running') && has('unix')
set term=ansi set term=ansi
endif endif
source screendump.vim source util/screendump.vim
" Test for scrolling that modifies buffer during visual block " Test for scrolling that modifies buffer during visual block
func Test_visual_block_scroll() func Test_visual_block_scroll()

View File

@ -1,6 +1,6 @@
" Test for the termdebug plugin " Test for the termdebug plugin
source screendump.vim source util/screendump.vim
CheckUnix CheckUnix
CheckFeature terminal CheckFeature terminal

View File

@ -1,7 +1,7 @@
" Test for the new-tutor plugin " Test for the new-tutor plugin
source screendump.vim source util/screendump.vim
source script_util.vim source util/script_util.vim
func SetUp() func SetUp()
set nocompatible set nocompatible

View File

@ -1,6 +1,6 @@
" Test for completion menu " Test for completion menu
source screendump.vim source util/screendump.vim
let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
let g:setting = '' let g:setting = ''

View File

@ -2,7 +2,7 @@
CheckFeature popupwin CheckFeature popupwin
source screendump.vim source util/screendump.vim
func Test_simple_popup() func Test_simple_popup()
CheckScreendump CheckScreendump

View File

@ -3,7 +3,7 @@
CheckFeature popupwin CheckFeature popupwin
CheckFeature textprop CheckFeature textprop
source screendump.vim source util/screendump.vim
func Test_textprop_popup() func Test_textprop_popup()
CheckScreendump CheckScreendump

View File

@ -2,7 +2,7 @@
CheckFeature profile CheckFeature profile
source screendump.vim source util/screendump.vim
if has('prof_nsec') if has('prof_nsec')
let s:header = 'count total (s) self (s)' let s:header = 'count total (s) self (s)'

View File

@ -2,7 +2,7 @@
CheckFeature channel CheckFeature channel
source screendump.vim source util/screendump.vim
func CanTestPromptBuffer() func CanTestPromptBuffer()
" We need to use a terminal window to be able to feed keys without leaving " We need to use a terminal window to be able to feed keys without leaving

View File

@ -1,6 +1,6 @@
" Tests for put commands, e.g. ":put", "p", "gp", "P", "gP", etc. " Tests for put commands, e.g. ":put", "p", "gp", "P", "gP", etc.
source screendump.vim source util/screendump.vim
func Test_put_block() func Test_put_block()
new new

View File

@ -1,9 +1,9 @@
" Test for the quickfix feature. " Test for the quickfix feature.
import './vim9.vim' as v9 import './util/vim9.vim' as v9
CheckFeature quickfix CheckFeature quickfix
source screendump.vim source util/screendump.vim
set encoding=utf-8 set encoding=utf-8

View File

@ -3,8 +3,8 @@
CheckFeature clientserver CheckFeature clientserver
CheckFeature terminal CheckFeature terminal
source screendump.vim source util/screendump.vim
source mouse.vim source util/mouse.vim
let s:remote_works = 0 let s:remote_works = 0
let s:skip = 'Skipped: --remote feature is not possible' let s:skip = 'Skipped: --remote feature is not possible'

View File

@ -1,7 +1,7 @@
" Test for 'scroll', 'scrolloff', 'smoothscroll', etc. " Test for 'scroll', 'scrolloff', 'smoothscroll', etc.
source screendump.vim source util/screendump.vim
source mouse.vim source util/mouse.vim
func Test_reset_scroll() func Test_reset_scroll()
let scr = &l:scroll let scr = &l:scroll

View File

@ -1,6 +1,6 @@
" Test for the search command " Test for the search command
source screendump.vim source util/screendump.vim
func Test_search_cmdline() func Test_search_cmdline()
CheckOption incsearch CheckOption incsearch

View File

@ -1,6 +1,6 @@
" Tests for search_stats, when "S" is not in 'shortmess' " Tests for search_stats, when "S" is not in 'shortmess'
source screendump.vim source util/screendump.vim
func Test_search_stat() func Test_search_stat()
new new

View File

@ -4,7 +4,7 @@
CheckNotGui CheckNotGui
CheckUnix CheckUnix
source mouse.vim source util/mouse.vim
" Test for select mode " Test for select mode
func Test_selectmode_basic() func Test_selectmode_basic()

View File

@ -2,7 +2,7 @@
CheckFeature signs CheckFeature signs
source screendump.vim source util/screendump.vim
func Test_sign() func Test_sign()
new new

View File

@ -3,7 +3,7 @@
CheckFeature spell CheckFeature spell
source screendump.vim source util/screendump.vim
func TearDown() func TearDown()
set nospell set nospell

View File

@ -1,6 +1,6 @@
" Test for getstacktrace() and v:stacktrace " Test for getstacktrace() and v:stacktrace
import './vim9.vim' as v9 import './util/vim9.vim' as v9
let s:thisfile = expand('%:p') let s:thisfile = expand('%:p')
let s:testdir = s:thisfile->fnamemodify(':h') let s:testdir = s:thisfile->fnamemodify(':h')

View File

@ -1,6 +1,6 @@
" Tests for startup. " Tests for startup.
source screendump.vim source util/screendump.vim
" Check that loading startup.vim works. " Check that loading startup.vim works.
func Test_startup_script() func Test_startup_script()

View File

@ -1,6 +1,6 @@
" Tests for startup using utf-8. " Tests for startup using utf-8.
source screendump.vim source util/screendump.vim
func Test_read_stdin_utf8() func Test_read_stdin_utf8()
let linesin = ['テスト', '€ÀÈÌÒÙ'] let linesin = ['テスト', '€ÀÈÌÒÙ']

View File

@ -3,7 +3,7 @@
" Not tested yet: " Not tested yet:
" %N " %N
source screendump.vim source util/screendump.vim
func SetUp() func SetUp()
set laststatus=2 set laststatus=2

View File

@ -1,6 +1,6 @@
" Tests for the substitute (:s) command " Tests for the substitute (:s) command
source screendump.vim source util/screendump.vim
" NOTE: This needs to be the first test to be " NOTE: This needs to be the first test to be
" run in the file, since it depends on " run in the file, since it depends on

View File

@ -2,7 +2,7 @@
CheckFeature syntax CheckFeature syntax
source screendump.vim source util/screendump.vim
func GetSyntaxItem(pat) func GetSyntaxItem(pat)
let c = '' let c = ''

View File

@ -1,6 +1,6 @@
" Test for tabline " Test for tabline
source screendump.vim source util/screendump.vim
func TablineWithCaughtError() func TablineWithCaughtError()
let s:func_in_tabline_called = 1 let s:func_in_tabline_called = 1

View File

@ -1,6 +1,6 @@
" Tests for tabpage " Tests for tabpage
source screendump.vim source util/screendump.vim
function Test_tabpage() function Test_tabpage()
CheckFeature quickfix CheckFeature quickfix

View File

@ -1,6 +1,6 @@
" Tests for tabpanel " Tests for tabpanel
source screendump.vim source util/screendump.vim
CheckFeature tabpanel CheckFeature tabpanel
function s:reset() function s:reset()

View File

@ -1,7 +1,7 @@
" Test 'tagfunc' " Test 'tagfunc'
import './vim9.vim' as v9 import './util/vim9.vim' as v9
source screendump.vim source util/screendump.vim
func TagFunc(pat, flag, info) func TagFunc(pat, flag, info)
let g:tagfunc_args = [a:pat, a:flag, a:info] let g:tagfunc_args = [a:pat, a:flag, a:info]

View File

@ -1,6 +1,6 @@
" Tests for tagjump (tags and special searches) " Tests for tagjump (tags and special searches)
source screendump.vim source util/screendump.vim
" SEGV occurs in older versions. (At least 7.4.1748 or older) " SEGV occurs in older versions. (At least 7.4.1748 or older)
func Test_ptag_with_notagstack() func Test_ptag_with_notagstack()

View File

@ -4,7 +4,7 @@
CheckNotGui CheckNotGui
CheckUnix CheckUnix
source mouse.vim source util/mouse.vim
func s:TermGuiColorsTest() func s:TermGuiColorsTest()
CheckNotMSWindows CheckNotMSWindows

View File

@ -4,7 +4,8 @@
" This only works with "iconv". " This only works with "iconv".
CheckFeature iconv CheckFeature iconv
source screendump.vim source util/screendump.vim
if !CanRunVimInTerminal() if !CanRunVimInTerminal()
throw 'Skipped: cannot make screendumps' throw 'Skipped: cannot make screendumps'
endif endif

View File

@ -4,8 +4,8 @@
CheckFeature terminal CheckFeature terminal
source screendump.vim source util/screendump.vim
source mouse.vim source util/mouse.vim
let s:python = PythonProg() let s:python = PythonProg()
let $PROMPT_COMMAND='' let $PROMPT_COMMAND=''

View File

@ -4,8 +4,8 @@
CheckFeature terminal CheckFeature terminal
source screendump.vim source util/screendump.vim
source mouse.vim source util/mouse.vim
let $PROMPT_COMMAND='' let $PROMPT_COMMAND=''

View File

@ -4,10 +4,10 @@
CheckFeature terminal CheckFeature terminal
source screendump.vim source util/screendump.vim
source mouse.vim source util/mouse.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
let $PROMPT_COMMAND='' let $PROMPT_COMMAND=''
@ -806,7 +806,7 @@ endfunc
" Test for sync buffer cwd with shell's pwd " Test for sync buffer cwd with shell's pwd
func Test_terminal_sync_shell_dir() func Test_terminal_sync_shell_dir()
CheckUnix CheckUnix
" The test always use sh (see src/testdir/unix.vim). " The test always use sh (see src/testdir/util/unix.vim).
" BSD's sh doesn't seem to play well with the OSC 7 escape sequence. " BSD's sh doesn't seem to play well with the OSC 7 escape sequence.
CheckNotBSD CheckNotBSD

View File

@ -4,8 +4,6 @@
CheckFeature terminal CheckFeature terminal
source shared.vim
func Test_terminal_redir_fails() func Test_terminal_redir_fails()
CheckUnix CheckUnix

View File

@ -3,8 +3,8 @@
CheckFeature textprop CheckFeature textprop
source screendump.vim source util/screendump.vim
import './vim9.vim' as v9 import './util/vim9.vim' as v9
func Test_proptype_global() func Test_proptype_global()
call prop_type_add('comment', {'highlight': 'Directory', 'priority': 123, 'start_incl': 1, 'end_incl': 1}) call prop_type_add('comment', {'highlight': 'Directory', 'priority': 123, 'start_incl': 1, 'end_incl': 1})

Some files were not shown because too many files have changed in this diff Show More