patch 9.1.1524: tests: too many imports in the test suite
Problem: tests: too many imports in the test suite
Solution: Clean up the imported scripts
Most tests make use of check.vim, so let's just source it once in
runtest.vim instead of having each test manually source it.
runtest.vim already sources shared.vim, which again sources
view_util.vim, so we don't need to source those two common
dependencies in all the other tests
And then check.vim sources term_util.vim already, so we can in addition
drop sourcing it explicitly in each single test script.
Note: test_expand_func.vim had to be updated to account for the changed
number of sourced files.
And finally check.vim uses line-continuation so let's also explicitly
enable line continuation via the 'cpo' option value.
related: #17677
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index 76f6692..fd160b0 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -1,6 +1,10 @@
source shared.vim
source term_util.vim
+" uses line-continuation
+let s:cpo_save = &cpo
+set cpo&vim
+
command -nargs=1 MissingFeature throw 'Skipped: ' .. <args> .. ' feature missing'
" Command to check for the presence of a feature.
@@ -324,4 +328,7 @@
throw "Skipped: FIXME: this test doesn't work on Github Actions CI"
endif
endfunc
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 5028a85..a56679c 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -106,6 +106,9 @@
" Needed for RunningWithValgrind().
source shared.vim
+" Needed for the various Check commands
+source check.vim
+
" For consistency run all tests with 'nocompatible' set.
" This also enables use of line continuation.
set nocp viminfo+=nviminfo
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index d7207d4..be6af86 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -5,9 +5,6 @@
finish
endif
-source shared.vim
-source term_util.vim
-
" Skip the rest if there is no terminal feature at all.
if !has('terminal')
finish
diff --git a/src/testdir/test_arabic.vim b/src/testdir/test_arabic.vim
index d2f28d8..8758e98 100644
--- a/src/testdir/test_arabic.vim
+++ b/src/testdir/test_arabic.vim
@@ -2,11 +2,8 @@
" NOTE: This just checks if the code works. If you know Arabic please add
" functional tests that check the shaping works with real text.
-source check.vim
CheckFeature arabic
-source view_util.vim
-
" Return list of Unicode characters at line lnum.
" Combining characters are treated as a single item.
func s:get_chars(lnum)
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index c320d09..2a76ca6 100644
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -1,9 +1,5 @@
" Test argument list commands
-source check.vim
-source shared.vim
-source term_util.vim
-
func Reset_arglist()
args a | %argd
endfunc
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim
index 15b18a4..ad4e751 100644
--- a/src/testdir/test_assert.vim
+++ b/src/testdir/test_assert.vim
@@ -1,8 +1,5 @@
" Test that the methods used for testing work.
-source check.vim
-source term_util.vim
-
func Test_assert_false()
call assert_equal(0, assert_false(0))
call assert_equal(0, assert_false(v:false))
diff --git a/src/testdir/test_autochdir.vim b/src/testdir/test_autochdir.vim
index eb40253..a9cb66b 100644
--- a/src/testdir/test_autochdir.vim
+++ b/src/testdir/test_autochdir.vim
@@ -1,6 +1,5 @@
" Test 'autochdir' behavior
-source check.vim
CheckOption autochdir
func Test_set_filename()
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 4d001c2..c78088d 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -1,8 +1,5 @@
" Tests for autocommands
-source shared.vim
-source check.vim
-source term_util.vim
source screendump.vim
import './vim9.vim' as v9
diff --git a/src/testdir/test_backup.vim b/src/testdir/test_backup.vim
index 68f2985..3c24a69 100644
--- a/src/testdir/test_backup.vim
+++ b/src/testdir/test_backup.vim
@@ -1,7 +1,5 @@
" Tests for the backup function
-source check.vim
-
func Test_backup()
set backup backupdir=. backupskip=
new
diff --git a/src/testdir/test_balloon.vim b/src/testdir/test_balloon.vim
index 1a9e225..6f89f2f 100644
--- a/src/testdir/test_balloon.vim
+++ b/src/testdir/test_balloon.vim
@@ -1,7 +1,6 @@
" Tests for 'balloonevalterm'.
" A few tests only work in the terminal.
-source check.vim
CheckNotGui
CheckFeature balloon_eval_term
diff --git a/src/testdir/test_balloon_gui.vim b/src/testdir/test_balloon_gui.vim
index d01114c..9043877 100644
--- a/src/testdir/test_balloon_gui.vim
+++ b/src/testdir/test_balloon_gui.vim
@@ -1,6 +1,5 @@
" Tests for 'ballooneval' in the GUI.
-source check.vim
CheckGui
CheckFeature balloon_eval
diff --git a/src/testdir/test_bench_regexp.vim b/src/testdir/test_bench_regexp.vim
index eb9f5f8..636d832 100644
--- a/src/testdir/test_bench_regexp.vim
+++ b/src/testdir/test_bench_regexp.vim
@@ -1,6 +1,5 @@
" Test for benchmarking the RE engine
-source check.vim
CheckFeature reltime
func Measure(file, pattern, arg)
diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim
index 16a11b3..e081307 100644
--- a/src/testdir/test_breakindent.vim
+++ b/src/testdir/test_breakindent.vim
@@ -4,10 +4,8 @@
" while the test is run, the breakindent caching gets in its way.
" It helps to change the tabstop setting and force a redraw (e.g. see
" Test_breakindent08())
-source check.vim
CheckOption breakindent
-source view_util.vim
source screendump.vim
func SetUp()
diff --git a/src/testdir/test_buffer.vim b/src/testdir/test_buffer.vim
index 36a6ef5..d6d6687 100644
--- a/src/testdir/test_buffer.vim
+++ b/src/testdir/test_buffer.vim
@@ -1,7 +1,5 @@
" Tests for Vim buffer
-source check.vim
-
" Test for the :bunload command with an offset
func Test_bunload_with_offset()
%bwipe!
diff --git a/src/testdir/test_bufline.vim b/src/testdir/test_bufline.vim
index 4ada241..1aa0c01 100644
--- a/src/testdir/test_bufline.vim
+++ b/src/testdir/test_bufline.vim
@@ -1,8 +1,6 @@
" Tests for setbufline(), getbufline(), appendbufline(), deletebufline()
-source shared.vim
source screendump.vim
-source check.vim
func Test_setbufline_getbufline()
" similar to Test_set_get_bufline()
diff --git a/src/testdir/test_bufwintabinfo.vim b/src/testdir/test_bufwintabinfo.vim
index 1517a9b..f7318ff 100644
--- a/src/testdir/test_bufwintabinfo.vim
+++ b/src/testdir/test_bufwintabinfo.vim
@@ -1,7 +1,5 @@
" Tests for the getbufinfo(), getwininfo() and gettabinfo() functions
-source check.vim
-
func Test_getbufwintabinfo()
CheckFeature quickfix
diff --git a/src/testdir/test_cd.vim b/src/testdir/test_cd.vim
index 85494d3..878a2ae 100644
--- a/src/testdir/test_cd.vim
+++ b/src/testdir/test_cd.vim
@@ -1,8 +1,5 @@
" Test for :cd and chdir()
-source shared.vim
-source check.vim
-
func Test_cd_large_path()
" This used to crash with a heap write overflow.
call assert_fails('cd ' . repeat('x', 5000), 'E344:')
diff --git a/src/testdir/test_cdo.vim b/src/testdir/test_cdo.vim
index dbed7df..9cf435a 100644
--- a/src/testdir/test_cdo.vim
+++ b/src/testdir/test_cdo.vim
@@ -1,6 +1,5 @@
" Tests for the :cdo, :cfdo, :ldo and :lfdo commands
-source check.vim
CheckFeature quickfix
" Create the files used by the tests
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 2d40eff..6a0ee54 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -1,12 +1,9 @@
" Test for channel and job functions.
" When +channel is supported then +job is too, so we don't check for that.
-source check.vim
CheckFeature channel
-source shared.vim
source screendump.vim
-source view_util.vim
let s:python = PythonProg()
if s:python == ''
diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim
index 02b0c39..3d69eed 100644
--- a/src/testdir/test_clientserver.vim
+++ b/src/testdir/test_clientserver.vim
@@ -1,6 +1,5 @@
" Tests for the +clientserver feature.
-source check.vim
CheckFeature job
if !has('clientserver')
diff --git a/src/testdir/test_clipmethod.vim b/src/testdir/test_clipmethod.vim
index 591b3a2..31a381c 100644
--- a/src/testdir/test_clipmethod.vim
+++ b/src/testdir/test_clipmethod.vim
@@ -1,7 +1,5 @@
" Tests for clipmethod
-source check.vim
-source shared.vim
source window_manager.vim
CheckFeature clipboard_working
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 6aedf3e..cfc64f7 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -1,9 +1,6 @@
" Tests for editing the command line.
-source check.vim
source screendump.vim
-source view_util.vim
-source shared.vim
import './vim9.vim' as v9
func SetUp()
diff --git a/src/testdir/test_cmdwin.vim b/src/testdir/test_cmdwin.vim
index 33a2662..9c37f20 100644
--- a/src/testdir/test_cmdwin.vim
+++ b/src/testdir/test_cmdwin.vim
@@ -1,6 +1,5 @@
" Tests for editing the command line.
-source check.vim
source screendump.vim
func Test_getcmdwintype()
diff --git a/src/testdir/test_compiler.vim b/src/testdir/test_compiler.vim
index d86c55f..d28349a 100644
--- a/src/testdir/test_compiler.vim
+++ b/src/testdir/test_compiler.vim
@@ -1,8 +1,5 @@
" Test the :compiler command
-source check.vim
-source shared.vim
-
func Test_compiler()
CheckExecutable perl
CheckFeature quickfix
diff --git a/src/testdir/test_conceal.vim b/src/testdir/test_conceal.vim
index bac3ed1..ac27dba 100644
--- a/src/testdir/test_conceal.vim
+++ b/src/testdir/test_conceal.vim
@@ -1,10 +1,8 @@
" Tests for 'conceal'.
-source check.vim
CheckFeature conceal
source screendump.vim
-source view_util.vim
func Test_conceal_two_windows()
CheckScreendump
diff --git a/src/testdir/test_cpoptions.vim b/src/testdir/test_cpoptions.vim
index 7bfbcd1..2afe3e8 100644
--- a/src/testdir/test_cpoptions.vim
+++ b/src/testdir/test_cpoptions.vim
@@ -1,9 +1,5 @@
" Test for the various 'cpoptions' (cpo) flags
-source check.vim
-source shared.vim
-source view_util.vim
-
" Test for the 'a' flag in 'cpo'. Reading a file should set the alternate
" file name.
func Test_cpo_a()
diff --git a/src/testdir/test_crash.vim b/src/testdir/test_crash.vim
index 80c1ccf..f497d9e 100644
--- a/src/testdir/test_crash.vim
+++ b/src/testdir/test_crash.vim
@@ -1,5 +1,4 @@
" Some tests, that used to crash Vim
-source check.vim
source screendump.vim
CheckScreendump
diff --git a/src/testdir/test_crypt.vim b/src/testdir/test_crypt.vim
index f056e38..4a96c30 100644
--- a/src/testdir/test_crypt.vim
+++ b/src/testdir/test_crypt.vim
@@ -1,7 +1,5 @@
" Tests for encryption.
-source shared.vim
-source check.vim
CheckFeature cryptv
" Use the xxd command from:
diff --git a/src/testdir/test_cscope.vim b/src/testdir/test_cscope.vim
index b2ecdcc..ddd4de0 100644
--- a/src/testdir/test_cscope.vim
+++ b/src/testdir/test_cscope.vim
@@ -1,6 +1,5 @@
" Test for cscope commands.
-source check.vim
CheckFeature cscope
CheckFeature quickfix
CheckExecutable cscope
diff --git a/src/testdir/test_cursor_func.vim b/src/testdir/test_cursor_func.vim
index 1fd6b5f..7316964 100644
--- a/src/testdir/test_cursor_func.vim
+++ b/src/testdir/test_cursor_func.vim
@@ -1,7 +1,5 @@
" Tests for cursor() and other functions that get/set the cursor position
-source check.vim
-
func Test_wrong_arguments()
call assert_fails('call cursor(1. 3)', 'E474:')
call assert_fails('call cursor(test_null_list())', 'E474:')
diff --git a/src/testdir/test_cursorline.vim b/src/testdir/test_cursorline.vim
index d258111..a497d0e 100644
--- a/src/testdir/test_cursorline.vim
+++ b/src/testdir/test_cursorline.vim
@@ -1,6 +1,5 @@
" Test for cursorline and cursorlineopt
-source check.vim
source screendump.vim
func s:screen_attr(lnum) abort
diff --git a/src/testdir/test_curswant.vim b/src/testdir/test_curswant.vim
index c67cca5..d4f86a1 100644
--- a/src/testdir/test_curswant.vim
+++ b/src/testdir/test_curswant.vim
@@ -1,8 +1,5 @@
" Tests for not changing curswant
-source check.vim
-source term_util.vim
-
func Test_curswant()
new
call append(0, ['1234567890', '12345'])
diff --git a/src/testdir/test_debugger.vim b/src/testdir/test_debugger.vim
index 2fd6855..be881b5 100644
--- a/src/testdir/test_debugger.vim
+++ b/src/testdir/test_debugger.vim
@@ -1,8 +1,6 @@
" Tests for the Vim script debug commands
-source shared.vim
source screendump.vim
-source check.vim
CheckRunVimInTerminal
diff --git a/src/testdir/test_delete.vim b/src/testdir/test_delete.vim
index 6323f9a..59d569f 100644
--- a/src/testdir/test_delete.vim
+++ b/src/testdir/test_delete.vim
@@ -1,7 +1,5 @@
" Test for delete().
-source check.vim
-source term_util.vim
source screendump.vim
func Test_file_delete()
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index a348d3a..5c38738 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
Binary files differ
diff --git a/src/testdir/test_digraph.vim b/src/testdir/test_digraph.vim
index 29fa300..c53b1bc 100644
--- a/src/testdir/test_digraph.vim
+++ b/src/testdir/test_digraph.vim
@@ -1,8 +1,6 @@
" Tests for digraphs
-source check.vim
CheckFeature digraphs
-source term_util.vim
func Put_Dig(chars)
exe "norm! o\<c-k>".a:chars
diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim
index 8f3806b..be6ca7b 100644
--- a/src/testdir/test_display.vim
+++ b/src/testdir/test_display.vim
@@ -4,8 +4,6 @@
set term=ansi
endif
-source view_util.vim
-source check.vim
source screendump.vim
func Test_display_foldcolumn()
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index bde2cb0..f8ef1d8 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -4,9 +4,7 @@
let &t_kD="[3;*~"
endif
-source check.vim
source screendump.vim
-source view_util.vim
" Needs to come first until the bug in getchar() is
" fixed: https://groups.google.com/d/msg/vim_dev/fXL9yme4H4c/bOR-U6_bAQAJ
diff --git a/src/testdir/test_environ.vim b/src/testdir/test_environ.vim
index b5dbdce..05d4f1f 100644
--- a/src/testdir/test_environ.vim
+++ b/src/testdir/test_environ.vim
@@ -2,8 +2,6 @@
scriptencoding utf-8
-source check.vim
-
func Test_environ()
unlet! $TESTENV
call assert_equal(0, has_key(environ(), 'TESTENV'))
diff --git a/src/testdir/test_escaped_glob.vim b/src/testdir/test_escaped_glob.vim
index f81961b..5da2a79 100644
--- a/src/testdir/test_escaped_glob.vim
+++ b/src/testdir/test_escaped_glob.vim
@@ -1,8 +1,6 @@
" Test whether glob()/globpath() return correct results with certain escaped
" characters.
-source check.vim
-
func SetUp()
" consistent sorting of file names
set nofileignorecase
diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim
index d2f949e..ada4667 100644
--- a/src/testdir/test_eval_stuff.vim
+++ b/src/testdir/test_eval_stuff.vim
Binary files differ
diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim
index 19d0bec..46dafeb 100644
--- a/src/testdir/test_ex_mode.vim
+++ b/src/testdir/test_ex_mode.vim
Binary files differ
diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim
index 3b7e489..66ef501 100644
--- a/src/testdir/test_excmd.vim
+++ b/src/testdir/test_excmd.vim
@@ -1,8 +1,5 @@
" Tests for various Ex commands.
-source check.vim
-source shared.vim
-source term_util.vim
source screendump.vim
func Test_ex_delete()
diff --git a/src/testdir/test_execute_func.vim b/src/testdir/test_execute_func.vim
index faaace0..e1c85b0 100644
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -1,9 +1,6 @@
" test execute()
-source view_util.vim
-source check.vim
import './vim9.vim' as v9
-source term_util.vim
func NestedEval()
let nested = execute('echo "nested\nlines"')
diff --git a/src/testdir/test_exit.vim b/src/testdir/test_exit.vim
index b0446ba..3e0919a 100644
--- a/src/testdir/test_exit.vim
+++ b/src/testdir/test_exit.vim
@@ -1,8 +1,5 @@
" Tests for exiting Vim.
-source shared.vim
-source check.vim
-
func Test_exiting()
let after =<< trim [CODE]
au QuitPre * call writefile(["QuitPre"], "Xtestout")
diff --git a/src/testdir/test_expand.vim b/src/testdir/test_expand.vim
index bebe138..84f1c7d 100644
--- a/src/testdir/test_expand.vim
+++ b/src/testdir/test_expand.vim
@@ -1,8 +1,5 @@
" Test for expanding file names
-source shared.vim
-source check.vim
-
func Test_with_directories()
call mkdir('Xdir1')
call mkdir('Xdir2')
diff --git a/src/testdir/test_expand_func.vim b/src/testdir/test_expand_func.vim
index 1570048..a2611e7 100644
--- a/src/testdir/test_expand_func.vim
+++ b/src/testdir/test_expand_func.vim
@@ -1,7 +1,5 @@
" Tests for expand()
-source shared.vim
-
let s:sfile = expand('<sfile>')
let s:slnum = str2nr(expand('<slnum>'))
let s:sflnum = str2nr(expand('<sflnum>'))
@@ -20,20 +18,20 @@
" This test depends on the location in the test file, put it first.
func Test_expand_sflnum()
- call assert_equal(7, s:sflnum)
- call assert_equal(24, str2nr(expand('<sflnum>')))
+ call assert_equal(5, s:sflnum)
+ call assert_equal(22, str2nr(expand('<sflnum>')))
" Line-continuation
call assert_equal(
- \ 27,
+ \ 25,
\ str2nr(expand('<sflnum>')))
" Call in script-local function
- call assert_equal(18, s:expand_sflnum())
+ call assert_equal(16, s:expand_sflnum())
" Call in command
command Flnum echo expand('<sflnum>')
- call assert_equal(36, str2nr(trim(execute('Flnum'))))
+ call assert_equal(34, str2nr(trim(execute('Flnum'))))
delcommand Flnum
endfunc
@@ -86,7 +84,7 @@
endfunc
func Test_expand_slnum()
- call assert_equal(6, s:slnum)
+ call assert_equal(4, s:slnum)
call assert_equal(2, str2nr(expand('<slnum>')))
" Line-continuation
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index 8bba1f0..e08019a 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -1,6 +1,5 @@
" Tests for expressions.
-source check.vim
import './vim9.vim' as v9
func Test_equal()
diff --git a/src/testdir/test_file_size.vim b/src/testdir/test_file_size.vim
index d349bc2..ae15d1a 100644
--- a/src/testdir/test_file_size.vim
+++ b/src/testdir/test_file_size.vim
@@ -8,8 +8,6 @@
" cksum is part of POSIX and so should be available on most Unixes.
" If it isn't available then the test will be skipped.
-source check.vim
-
func Test_File_Size()
CheckExecutable cksum
diff --git a/src/testdir/test_filechanged.vim b/src/testdir/test_filechanged.vim
index 12ac4cc..da51751 100644
--- a/src/testdir/test_filechanged.vim
+++ b/src/testdir/test_filechanged.vim
@@ -1,7 +1,5 @@
" Tests for when a file was changed outside of Vim.
-source check.vim
-
func Test_FileChangedShell_reload()
CheckUnix
diff --git a/src/testdir/test_filecopy.vim b/src/testdir/test_filecopy.vim
index b526dce..956f3d7 100644
--- a/src/testdir/test_filecopy.vim
+++ b/src/testdir/test_filecopy.vim
@@ -1,8 +1,5 @@
" Test filecopy()
-source check.vim
-source shared.vim
-
func Test_copy_file_to_file()
call writefile(['foo'], 'Xcopy1')
diff --git a/src/testdir/test_fileformat.vim b/src/testdir/test_fileformat.vim
index 7d919c2..a5687f9 100644
--- a/src/testdir/test_fileformat.vim
+++ b/src/testdir/test_fileformat.vim
@@ -1,7 +1,5 @@
" Test for 'fileformat'
-source shared.vim
-
" Test behavior of fileformat after bwipeout of last buffer
func Test_fileformat_after_bw()
bwipeout
diff --git a/src/testdir/test_filter_cmd.vim b/src/testdir/test_filter_cmd.vim
index 7c84a13..4edcb66 100644
--- a/src/testdir/test_filter_cmd.vim
+++ b/src/testdir/test_filter_cmd.vim
@@ -1,7 +1,5 @@
" Test the :filter command modifier
-source check.vim
-
func Test_filter()
edit Xdoesnotmatch
edit Xwillmatch
diff --git a/src/testdir/test_findfile.vim b/src/testdir/test_findfile.vim
index a7c3dc2..ec380cb 100644
--- a/src/testdir/test_findfile.vim
+++ b/src/testdir/test_findfile.vim
@@ -1,6 +1,5 @@
" Test findfile() and finddir()
-source check.vim
import './vim9.vim' as v9
let s:files = [ 'Xfinddir1/foo',
diff --git a/src/testdir/test_float_func.vim b/src/testdir/test_float_func.vim
index acc2e11..23e3c31 100644
--- a/src/testdir/test_float_func.vim
+++ b/src/testdir/test_float_func.vim
@@ -1,6 +1,5 @@
" test float functions
-source check.vim
import './vim9.vim' as v9
func Test_abs()
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim
index 17487a5..0fc99bc 100644
--- a/src/testdir/test_fold.vim
+++ b/src/testdir/test_fold.vim
Binary files differ
diff --git a/src/testdir/test_format.vim b/src/testdir/test_format.vim
index c261288..b6be204 100644
--- a/src/testdir/test_format.vim
+++ b/src/testdir/test_format.vim
@@ -1,6 +1,5 @@
" Tests for expressions.
-source check.vim
import './vim9.vim' as v9
func Test_printf_pos_misc()
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 847987b..ae16d1e 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1,8 +1,5 @@
" Tests for various functions.
-source shared.vim
-source check.vim
-source term_util.vim
source screendump.vim
import './vim9.vim' as v9
diff --git a/src/testdir/test_gettext.vim b/src/testdir/test_gettext.vim
index ddfc402..626e256 100644
--- a/src/testdir/test_gettext.vim
+++ b/src/testdir/test_gettext.vim
@@ -1,8 +1,7 @@
-source check.vim
+" Test for gettext()
CheckFeature gettext
-" Test for gettext()
func Test_gettext()
call assert_fails('call bindtextdomain("test")', 'E119:')
call assert_fails('call bindtextdomain("vim", "test")', 'E475:')
diff --git a/src/testdir/test_gettext_cp1251.vim b/src/testdir/test_gettext_cp1251.vim
index 9c30e09..0108dbb 100644
--- a/src/testdir/test_gettext_cp1251.vim
+++ b/src/testdir/test_gettext_cp1251.vim
@@ -1,4 +1,3 @@
-source check.vim
" This fail on CI MacOS 14 because bindtextdomain() is not available there
" (missing library?)
CheckNotMac
diff --git a/src/testdir/test_gettext_make.vim b/src/testdir/test_gettext_make.vim
index 860aa2c..2347c8e 100644
--- a/src/testdir/test_gettext_make.vim
+++ b/src/testdir/test_gettext_make.vim
@@ -1,4 +1,3 @@
-source check.vim
CheckNotMac
CheckFeature gettext
diff --git a/src/testdir/test_gettext_utf8.vim b/src/testdir/test_gettext_utf8.vim
index 87fe1b1..b1ab6f8 100644
--- a/src/testdir/test_gettext_utf8.vim
+++ b/src/testdir/test_gettext_utf8.vim
@@ -1,4 +1,3 @@
-source check.vim
" This fail on CI MacOS 14 because bindtextdomain() is not available there
" (missing library?)
CheckNotMac
diff --git a/src/testdir/test_global.vim b/src/testdir/test_global.vim
index 0f72c3c..4dddd0f 100644
--- a/src/testdir/test_global.vim
+++ b/src/testdir/test_global.vim
@@ -1,8 +1,5 @@
" Test for :global and :vglobal
-source check.vim
-source term_util.vim
-
func Test_yank_put_clipboard()
new
call setline(1, ['a', 'b', 'c'])
diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim
index 83de2ad..45966eb 100644
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -1,7 +1,5 @@
" Tests specifically for the GUI
-source shared.vim
-source check.vim
CheckCanRunGui
source setup_gui.vim
diff --git a/src/testdir/test_gui_init.vim b/src/testdir/test_gui_init.vim
index 6f22013..f3effff 100644
--- a/src/testdir/test_gui_init.vim
+++ b/src/testdir/test_gui_init.vim
@@ -1,8 +1,6 @@
" Tests specifically for the GUI features/options that need to be set up at
" startup to take effect at runtime.
-source shared.vim
-source check.vim
CheckCanRunGui
source setup_gui.vim
diff --git a/src/testdir/test_hardcopy.vim b/src/testdir/test_hardcopy.vim
index 926ff8f..33ef4bf 100644
--- a/src/testdir/test_hardcopy.vim
+++ b/src/testdir/test_hardcopy.vim
@@ -1,7 +1,5 @@
" Test :hardcopy
-source check.vim
-
func Test_printoptions()
edit test_hardcopy.vim
syn on
diff --git a/src/testdir/test_help.vim b/src/testdir/test_help.vim
index 6422317..e87d312 100644
--- a/src/testdir/test_help.vim
+++ b/src/testdir/test_help.vim
@@ -1,6 +1,5 @@
" Tests for :help
-source check.vim
import './vim9.vim' as v9
func Test_help_restore_snapshot()
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index 91423eb..487eb8d 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -1,8 +1,6 @@
" Tests for ":highlight" and highlighting.
-source view_util.vim
source screendump.vim
-source check.vim
source script_util.vim
import './vim9.vim' as v9
diff --git a/src/testdir/test_history.vim b/src/testdir/test_history.vim
index b288abc..2470a5b 100644
--- a/src/testdir/test_history.vim
+++ b/src/testdir/test_history.vim
@@ -1,6 +1,5 @@
" Tests for the history functions
-source check.vim
CheckFeature cmdline_hist
set history=7
diff --git a/src/testdir/test_hlsearch.vim b/src/testdir/test_hlsearch.vim
index 557fe5d..18992d3 100644
--- a/src/testdir/test_hlsearch.vim
+++ b/src/testdir/test_hlsearch.vim
@@ -1,6 +1,5 @@
" Test for v:hlsearch
-source check.vim
source screendump.vim
func Test_hlsearch()
diff --git a/src/testdir/test_iminsert.vim b/src/testdir/test_iminsert.vim
index 11fe24e..e20cddd 100644
--- a/src/testdir/test_iminsert.vim
+++ b/src/testdir/test_iminsert.vim
@@ -1,7 +1,5 @@
" Test for 'iminsert'
-source view_util.vim
-source check.vim
import './vim9.vim' as v9
let s:imactivatefunc_called = 0
diff --git a/src/testdir/test_indent.vim b/src/testdir/test_indent.vim
index 57f5206..e206947 100644
--- a/src/testdir/test_indent.vim
+++ b/src/testdir/test_indent.vim
@@ -1,8 +1,5 @@
" Test for various indent options
-source shared.vim
-source check.vim
-
func Test_preserveindent()
new
" Test for autoindent copying indent from the previous line
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim
index f1ed313..d906e7a 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -1,7 +1,6 @@
" Test for insert completion
source screendump.vim
-source check.vim
import './vim9.vim' as v9
" Test for insert expansion
diff --git a/src/testdir/test_job_fails.vim b/src/testdir/test_job_fails.vim
index 1751d1d..b8eee91 100644
--- a/src/testdir/test_job_fails.vim
+++ b/src/testdir/test_job_fails.vim
@@ -2,8 +2,6 @@
" leaks under valgrind. That is because when fork/exec fails memory is not
" freed. Since the process exits right away it's not a real leak.
-source check.vim
-
func Test_job_start_fails()
CheckFeature job
let job = job_start('axdfxsdf')
diff --git a/src/testdir/test_lambda.vim b/src/testdir/test_lambda.vim
index f05080e..42f53b1 100644
--- a/src/testdir/test_lambda.vim
+++ b/src/testdir/test_lambda.vim
@@ -1,6 +1,5 @@
" Test for lambda and closure
-source check.vim
import './vim9.vim' as v9
func Test_lambda_feature()
diff --git a/src/testdir/test_langmap.vim b/src/testdir/test_langmap.vim
index aaed77e..4a84277 100644
--- a/src/testdir/test_langmap.vim
+++ b/src/testdir/test_langmap.vim
@@ -1,6 +1,5 @@
" tests for 'langmap'
-source check.vim
CheckFeature langmap
func Test_langmap()
diff --git a/src/testdir/test_listchars.vim b/src/testdir/test_listchars.vim
index 8bed38a..387f6af 100644
--- a/src/testdir/test_listchars.vim
+++ b/src/testdir/test_listchars.vim
@@ -1,7 +1,5 @@
" Tests for 'listchars' display with 'list' and :list
-source check.vim
-source view_util.vim
source screendump.vim
func Check_listchars(expected, end_lnum, end_scol = -1, leftcol = 0)
diff --git a/src/testdir/test_listlbr.vim b/src/testdir/test_listlbr.vim
index 68bf948..d186983 100644
--- a/src/testdir/test_listlbr.vim
+++ b/src/testdir/test_listlbr.vim
@@ -3,11 +3,9 @@
set encoding=latin1
scriptencoding latin1
-source check.vim
CheckOption linebreak
CheckFeature conceal
-source view_util.vim
source screendump.vim
function s:screen_lines(lnum, width) abort
diff --git a/src/testdir/test_listlbr_utf8.vim b/src/testdir/test_listlbr_utf8.vim
index bd0578e..d69cae7 100644
--- a/src/testdir/test_listlbr_utf8.vim
+++ b/src/testdir/test_listlbr_utf8.vim
@@ -3,12 +3,10 @@
set encoding=utf-8
scriptencoding utf-8
-source check.vim
CheckOption linebreak
CheckFeature conceal
CheckFeature signs
-source view_util.vim
source screendump.vim
func s:screen_lines(lnum, width) abort
diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim
index 043531a..7e61de2 100644
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -1,7 +1,5 @@
" Tests for Lua.
-source check.vim
-
" This test also works without the lua feature.
func Test_skip_lua()
if 0
diff --git a/src/testdir/test_makeencoding.vim b/src/testdir/test_makeencoding.vim
index f3dc82b..40bad97 100644
--- a/src/testdir/test_makeencoding.vim
+++ b/src/testdir/test_makeencoding.vim
@@ -1,8 +1,5 @@
" Tests for 'makeencoding'.
-source shared.vim
-source check.vim
-
CheckFeature quickfix
let s:python = PythonProg()
if s:python == ''
diff --git a/src/testdir/test_map_functions.vim b/src/testdir/test_map_functions.vim
index db63933..8f98ef7 100644
--- a/src/testdir/test_map_functions.vim
+++ b/src/testdir/test_map_functions.vim
@@ -1,8 +1,6 @@
" Tests for maparg(), mapcheck(), mapset(), maplist()
" Also test utf8 map with a 0x80 byte.
-source shared.vim
-
func s:SID()
return str2nr(matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$'))
endfunc
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index c352531..28b0188 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -1,9 +1,6 @@
" Tests for mappings and abbreviations
-source shared.vim
-source check.vim
source screendump.vim
-source term_util.vim
import './vim9.vim' as v9
func Test_abbreviation()
diff --git a/src/testdir/test_match.vim b/src/testdir/test_match.vim
index 1e42aba..35311d4 100644
--- a/src/testdir/test_match.vim
+++ b/src/testdir/test_match.vim
@@ -2,7 +2,6 @@
" matchaddpos(), matcharg(), matchdelete(), and setmatches().
source screendump.vim
-source check.vim
function Test_match()
highlight MyGroup1 term=bold ctermbg=red guibg=red
diff --git a/src/testdir/test_matchadd_conceal.vim b/src/testdir/test_matchadd_conceal.vim
index 1602c4f..764e8c6 100644
--- a/src/testdir/test_matchadd_conceal.vim
+++ b/src/testdir/test_matchadd_conceal.vim
@@ -1,16 +1,11 @@
" Test for matchadd() and conceal feature
-source check.vim
CheckFeature conceal
if !has('gui_running') && has('unix')
set term=ansi
endif
-source shared.vim
-source term_util.vim
-source view_util.vim
-
func Test_simple_matchadd()
new
diff --git a/src/testdir/test_matchadd_conceal_utf8.vim b/src/testdir/test_matchadd_conceal_utf8.vim
index 83849e1..bc8a97c 100644
--- a/src/testdir/test_matchadd_conceal_utf8.vim
+++ b/src/testdir/test_matchadd_conceal_utf8.vim
@@ -1,6 +1,5 @@
" Test for matchadd() and conceal feature using utf-8.
-source check.vim
CheckFeature conceal
if !has('gui_running') && has('unix')
diff --git a/src/testdir/test_matchfuzzy.vim b/src/testdir/test_matchfuzzy.vim
index a16bae5..8aa7f32 100644
--- a/src/testdir/test_matchfuzzy.vim
+++ b/src/testdir/test_matchfuzzy.vim
@@ -1,9 +1,5 @@
" Tests for fuzzy matching
-source shared.vim
-source check.vim
-source term_util.vim
-
" Test for matchfuzzy()
func Test_matchfuzzy()
call assert_fails('call matchfuzzy(10, "abc")', 'E686:')
diff --git a/src/testdir/test_memory_usage.vim b/src/testdir/test_memory_usage.vim
index 13e7eec..66c27a1 100644
--- a/src/testdir/test_memory_usage.vim
+++ b/src/testdir/test_memory_usage.vim
@@ -1,6 +1,5 @@
" Tests for memory usage.
-source check.vim
CheckFeature terminal
CheckNotGui
@@ -8,8 +7,6 @@
" usage.
CheckNotAsan
-source shared.vim
-
func s:pick_nr(str) abort
return substitute(a:str, '[^0-9]', '', 'g') * 1
endfunc
diff --git a/src/testdir/test_menu.vim b/src/testdir/test_menu.vim
index 8ac1da5..f441190 100644
--- a/src/testdir/test_menu.vim
+++ b/src/testdir/test_menu.vim
@@ -1,6 +1,5 @@
" Test that the system menu can be loaded.
-source check.vim
CheckFeature menu
source screendump.vim
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index e1eab59..e9eb099 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -1,9 +1,5 @@
" Tests for :messages, :echomsg, :echoerr
-source check.vim
-source shared.vim
-source term_util.vim
-source view_util.vim
source screendump.vim
func Test_messages()
diff --git a/src/testdir/test_method.vim b/src/testdir/test_method.vim
index 99e4917..797aa60 100644
--- a/src/testdir/test_method.vim
+++ b/src/testdir/test_method.vim
@@ -1,7 +1,5 @@
" Tests for ->method()
-source check.vim
-
func Test_list_method()
let l = [1, 2, 3]
call assert_equal([1, 2, 3, 4], [1, 2, 3]->add(4))
diff --git a/src/testdir/test_mksession.vim b/src/testdir/test_mksession.vim
index 8217d91..c4d8fd7 100644
--- a/src/testdir/test_mksession.vim
+++ b/src/testdir/test_mksession.vim
@@ -3,12 +3,8 @@
set encoding=latin1
scriptencoding latin1
-source check.vim
CheckFeature mksession
-source shared.vim
-source term_util.vim
-
" Test for storing global and local argument list in a session file
" This one must be done first.
func Test__mksession_arglocal()
diff --git a/src/testdir/test_mksession_utf8.vim b/src/testdir/test_mksession_utf8.vim
index 387d128..d467dc2 100644
--- a/src/testdir/test_mksession_utf8.vim
+++ b/src/testdir/test_mksession_utf8.vim
@@ -3,7 +3,6 @@
set encoding=utf-8
scriptencoding utf-8
-source check.vim
CheckFeature mksession
func Test_mksession_utf8()
diff --git a/src/testdir/test_modeless.vim b/src/testdir/test_modeless.vim
index 281c248..d96be4b 100644
--- a/src/testdir/test_modeless.vim
+++ b/src/testdir/test_modeless.vim
@@ -1,11 +1,9 @@
" Test for modeless selection
" This only works for Unix in a terminal
-source check.vim
CheckNotGui
CheckUnix
-source shared.vim
source mouse.vim
" Test for modeless characterwise selection (single click)
diff --git a/src/testdir/test_modeline.vim b/src/testdir/test_modeline.vim
index 0697fbb..1f86863 100644
--- a/src/testdir/test_modeline.vim
+++ b/src/testdir/test_modeline.vim
@@ -1,7 +1,5 @@
" Tests for parsing the modeline.
-source check.vim
-
func Test_modeline_invalid()
" This was reading allocated memory in the past.
call writefile(['vi:0', 'nothing'], 'Xmodeline', 'D')
diff --git a/src/testdir/test_move.vim b/src/testdir/test_move.vim
index d932a60..c45157f 100644
--- a/src/testdir/test_move.vim
+++ b/src/testdir/test_move.vim
@@ -1,6 +1,5 @@
" Test the ":move" command.
-source check.vim
source screendump.vim
func Test_move()
diff --git a/src/testdir/test_mswin_event.vim b/src/testdir/test_mswin_event.vim
index 3b7b3c7..0a4407c 100644
--- a/src/testdir/test_mswin_event.vim
+++ b/src/testdir/test_mswin_event.vim
@@ -1,7 +1,6 @@
" Test MS-Windows input event handling.
" Most of this works the same in Windows GUI as well as Windows console.
-source check.vim
CheckMSWindows
source mouse.vim
diff --git a/src/testdir/test_mzscheme.vim b/src/testdir/test_mzscheme.vim
index 0bc9842..a6f57a8 100644
--- a/src/testdir/test_mzscheme.vim
+++ b/src/testdir/test_mzscheme.vim
@@ -1,6 +1,5 @@
" Test for MzScheme interface and mzeval() function
-source check.vim
CheckFeature mzscheme
func MzRequire()
diff --git a/src/testdir/test_nested_function.vim b/src/testdir/test_nested_function.vim
index 5599655..9b8f564 100644
--- a/src/testdir/test_nested_function.vim
+++ b/src/testdir/test_nested_function.vim
@@ -1,7 +1,5 @@
" Tests for nested functions
-source check.vim
-
func NestedFunc()
func! Func1()
let g:text .= 'Func1 '
diff --git a/src/testdir/test_netbeans.vim b/src/testdir/test_netbeans.vim
index e458e38..cfb9736 100644
--- a/src/testdir/test_netbeans.vim
+++ b/src/testdir/test_netbeans.vim
@@ -1,10 +1,7 @@
" Test the netbeans interface.
-source check.vim
CheckFeature netbeans_intg
-source shared.vim
-
let s:python = PythonProg()
if s:python == ''
throw 'Skipped: python program missing'
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index a0ee3b8..aa1fa10 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -1,8 +1,5 @@
" Test for various Normal mode commands
-source shared.vim
-source check.vim
-source view_util.vim
import './vim9.vim' as v9
source screendump.vim
diff --git a/src/testdir/test_number.vim b/src/testdir/test_number.vim
index b57c1ed..10b6988 100644
--- a/src/testdir/test_number.vim
+++ b/src/testdir/test_number.vim
@@ -1,8 +1,5 @@
" Test for 'number' and 'relativenumber'
-source check.vim
-source view_util.vim
-
source screendump.vim
func s:screen_lines(start, end) abort
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 21e4a03..e4bf63a 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -1,9 +1,5 @@
" Test for options
-source shared.vim
-source check.vim
-source view_util.vim
-
scriptencoding utf-8
func Test_whichwrap()
diff --git a/src/testdir/test_packadd.vim b/src/testdir/test_packadd.vim
index eab710d..cd7126a 100644
--- a/src/testdir/test_packadd.vim
+++ b/src/testdir/test_packadd.vim
@@ -1,7 +1,5 @@
" Tests for 'packpath' and :packadd
-source check.vim
-
func SetUp()
let s:topdir = getcwd() . '/Xppdir'
exe 'set packpath=' . s:topdir
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index acc8b73..a6ba84a 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -1,7 +1,5 @@
" Test binding arguments to a Funcref.
-source check.vim
-
func MyFunc(arg1, arg2, arg3)
return a:arg1 . '/' . a:arg2 . '/' . a:arg3
endfunc
diff --git a/src/testdir/test_paste.vim b/src/testdir/test_paste.vim
index b35fc81..bd87e3b 100644
--- a/src/testdir/test_paste.vim
+++ b/src/testdir/test_paste.vim
@@ -1,15 +1,11 @@
" Tests for bracketed paste and other forms of pasting.
" Bracketed paste only works with "xterm". Not in GUI or Windows console.
-source check.vim
-source term_util.vim
CheckNotMSWindows
CheckNotGui
set term=xterm
-source shared.vim
-
func Test_paste_normal_mode()
new
" In first column text is inserted
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim
index 31329ca..cededb2 100644
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -1,7 +1,5 @@
" Tests for Perl interface
-source check.vim
-source shared.vim
CheckFeature perl
" FIXME: RunTest don't see any error when Perl abort...
diff --git a/src/testdir/test_plugin_comment.vim b/src/testdir/test_plugin_comment.vim
index 1c50748..c07d21a 100644
--- a/src/testdir/test_plugin_comment.vim
+++ b/src/testdir/test_plugin_comment.vim
@@ -1,8 +1,5 @@
" Test for the comment package
-source check.vim
-source term_util.vim
-
func Test_basic_comment()
CheckScreendump
let lines =<< trim END
diff --git a/src/testdir/test_plugin_matchparen.vim b/src/testdir/test_plugin_matchparen.vim
index 74563a1..47fd3ed 100644
--- a/src/testdir/test_plugin_matchparen.vim
+++ b/src/testdir/test_plugin_matchparen.vim
@@ -4,8 +4,6 @@
set term=ansi
endif
-source view_util.vim
-source check.vim
source screendump.vim
" Test for scrolling that modifies buffer during visual block
diff --git a/src/testdir/test_plugin_termdebug.vim b/src/testdir/test_plugin_termdebug.vim
index a045a8d..9017bda 100644
--- a/src/testdir/test_plugin_termdebug.vim
+++ b/src/testdir/test_plugin_termdebug.vim
@@ -1,8 +1,6 @@
" Test for the termdebug plugin
-source shared.vim
source screendump.vim
-source check.vim
CheckUnix
CheckFeature terminal
diff --git a/src/testdir/test_plugin_tohtml.vim b/src/testdir/test_plugin_tohtml.vim
index a1c8572..a5c9d27 100644
--- a/src/testdir/test_plugin_tohtml.vim
+++ b/src/testdir/test_plugin_tohtml.vim
@@ -1,7 +1,5 @@
" Tests for Vim :TOhtml
-source check.vim
-
func s:setup_basic(src_name)
let lines =<< trim END
#include <stdio.h>
diff --git a/src/testdir/test_plugin_tutor.vim b/src/testdir/test_plugin_tutor.vim
index 5b85b65..5c3dcd9 100644
--- a/src/testdir/test_plugin_tutor.vim
+++ b/src/testdir/test_plugin_tutor.vim
@@ -1,7 +1,6 @@
" Test for the new-tutor plugin
source screendump.vim
-source check.vim
source script_util.vim
func SetUp()
diff --git a/src/testdir/test_plugin_zip.vim b/src/testdir/test_plugin_zip.vim
index 2050b4c..516f54e 100644
--- a/src/testdir/test_plugin_zip.vim
+++ b/src/testdir/test_plugin_zip.vim
@@ -1,5 +1,3 @@
-so check.vim
-
CheckExecutable unzip
if 0 " Find uncovered line
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 0ace290..7e268e8 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1,8 +1,6 @@
" Test for completion menu
-source shared.vim
source screendump.vim
-source check.vim
let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
let g:setting = ''
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index f01b749..6464e1e 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -1,10 +1,8 @@
" Tests for popup windows
-source check.vim
CheckFeature popupwin
source screendump.vim
-source term_util.vim
func Test_simple_popup()
CheckScreendump
diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim
index 50e2848..a099383 100644
--- a/src/testdir/test_popupwin_textprop.vim
+++ b/src/testdir/test_popupwin_textprop.vim
@@ -1,6 +1,5 @@
" Tests for popup windows for text properties
-source check.vim
CheckFeature popupwin
CheckFeature textprop
diff --git a/src/testdir/test_preview.vim b/src/testdir/test_preview.vim
index 7c7883a..e06139c 100644
--- a/src/testdir/test_preview.vim
+++ b/src/testdir/test_preview.vim
@@ -1,6 +1,5 @@
" Tests for the preview window
-source check.vim
CheckFeature quickfix
func Test_Psearch()
diff --git a/src/testdir/test_profile.vim b/src/testdir/test_profile.vim
index 534cc76..8c0260c 100644
--- a/src/testdir/test_profile.vim
+++ b/src/testdir/test_profile.vim
@@ -1,9 +1,7 @@
" Test Vim profiler
-source check.vim
CheckFeature profile
-source shared.vim
source screendump.vim
if has('prof_nsec')
diff --git a/src/testdir/test_prompt_buffer.vim b/src/testdir/test_prompt_buffer.vim
index c5ef010..414ed6e 100644
--- a/src/testdir/test_prompt_buffer.vim
+++ b/src/testdir/test_prompt_buffer.vim
@@ -1,9 +1,7 @@
" Tests for setting 'buftype' to "prompt"
-source check.vim
CheckFeature channel
-source shared.vim
source screendump.vim
func CanTestPromptBuffer()
diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim
index 5a99b3b..91a01a4 100644
--- a/src/testdir/test_put.vim
+++ b/src/testdir/test_put.vim
Binary files differ
diff --git a/src/testdir/test_python2.vim b/src/testdir/test_python2.vim
index cafba3d..30c3b33 100644
--- a/src/testdir/test_python2.vim
+++ b/src/testdir/test_python2.vim
@@ -1,9 +1,7 @@
" Test for python 2 commands.
-source check.vim
CheckFeature python
CheckFeature quickfix
-source shared.vim
" NOTE: This will cause errors when run under valgrind.
" This would require recompiling Python with:
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index e59ddf9..bd000ef 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -1,8 +1,6 @@
" Test for python 3 commands.
-source check.vim
CheckFeature python3
-source shared.vim
func Create_vim_list()
return [1]
diff --git a/src/testdir/test_pyx2.vim b/src/testdir/test_pyx2.vim
index 68f1901..40b359a 100644
--- a/src/testdir/test_pyx2.vim
+++ b/src/testdir/test_pyx2.vim
@@ -1,7 +1,6 @@
" Test for pyx* commands and functions with Python 2.
set pyx=2
-source check.vim
CheckFeature python
let s:py2pattern = '^2\.[0-7]\.\d\+'
diff --git a/src/testdir/test_pyx3.vim b/src/testdir/test_pyx3.vim
index b02f447..7820cc9 100644
--- a/src/testdir/test_pyx3.vim
+++ b/src/testdir/test_pyx3.vim
@@ -1,7 +1,6 @@
" Test for pyx* commands and functions with Python 3.
set pyx=3
-source check.vim
CheckFeature python3
let s:py2pattern = '^2\.[0-7]\.\d\+'
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index dc2a2a4..7047d8c 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -1,6 +1,5 @@
" Test for the quickfix feature.
-source check.vim
import './vim9.vim' as v9
CheckFeature quickfix
diff --git a/src/testdir/test_quotestar.vim b/src/testdir/test_quotestar.vim
index 322ce62..7ccee43 100644
--- a/src/testdir/test_quotestar.vim
+++ b/src/testdir/test_quotestar.vim
@@ -1,8 +1,5 @@
" *-register (quotestar) tests
-source shared.vim
-source check.vim
-
CheckFeature clipboard_working
func Do_test_quotestar_for_macunix()
diff --git a/src/testdir/test_random.vim b/src/testdir/test_random.vim
index be8473f..02a4624 100644
--- a/src/testdir/test_random.vim
+++ b/src/testdir/test_random.vim
@@ -1,8 +1,5 @@
" Tests for srand() and rand()
-source check.vim
-source shared.vim
-
func Test_Rand()
let r = srand(123456789)
call assert_equal([1573771921, 319883699, 2742014374, 1324369493], r)
diff --git a/src/testdir/test_recover.vim b/src/testdir/test_recover.vim
index e85b2e9..db59223 100644
--- a/src/testdir/test_recover.vim
+++ b/src/testdir/test_recover.vim
@@ -1,7 +1,5 @@
" Test :recover
-source check.vim
-
func Test_recover_root_dir()
" This used to access invalid memory.
split Xtest
diff --git a/src/testdir/test_regex_char_classes.vim b/src/testdir/test_regex_char_classes.vim
index db16f05..5e77c85 100644
--- a/src/testdir/test_regex_char_classes.vim
+++ b/src/testdir/test_regex_char_classes.vim
@@ -1,6 +1,5 @@
" Tests for regexp with backslash and other special characters inside []
" Also test backslash for hex/octal numbered character.
-"
scriptencoding utf-8
@@ -20,7 +19,6 @@
quit!
endfunction
-
function Test_x_search()
let res = "test text test text"
call RunXTest("test \\text test text", "/[\\x]", res)
diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim
index 63f093a..573cf13 100644
--- a/src/testdir/test_regexp_latin.vim
+++ b/src/testdir/test_regexp_latin.vim
@@ -3,8 +3,6 @@
set encoding=latin1
scriptencoding latin1
-source check.vim
-
func s:equivalence_test()
let str = 'AÀÁÂÃÄÅ B C D EÈÉÊË F G H IÌÍÎÏ J K L M NÑ OÒÓÔÕÖØ P Q R S T UÙÚÛÜ V W X YÝ Z '
\ .. 'aàáâãäå b c d eèéêë f g h iìíîï j k l m nñ oòóôõöø p q r s t uùúûü v w x yýÿ z '
diff --git a/src/testdir/test_regexp_utf8.vim b/src/testdir/test_regexp_utf8.vim
index 51c0984..a4353f1 100644
--- a/src/testdir/test_regexp_utf8.vim
+++ b/src/testdir/test_regexp_utf8.vim
@@ -1,7 +1,5 @@
" Tests for regexp in utf8 encoding
-source shared.vim
-
func s:equivalence_test()
let str = "AÀÁÂÃÄÅĀĂĄǍǞǠǺȂȦȺḀẠẢẤẦẨẪẬẮẰẲẴẶ BƁɃḂḄḆ CÇĆĈĊČƇȻḈꞒ DĎĐƊḊḌḎḐḒ EÈÉÊËĒĔĖĘĚȄȆȨɆḔḖḘḚḜẸẺẼẾỀỂỄỆ FƑḞꞘ GĜĞĠĢƓǤǦǴḠꞠ HĤĦȞḢḤḦḨḪⱧ IÌÍÎÏĨĪĬĮİƗǏȈȊḬḮỈỊ JĴɈ KĶƘǨḰḲḴⱩꝀ LĹĻĽĿŁȽḶḸḺḼⱠ MḾṀṂ NÑŃŅŇǸṄṆṈṊꞤ OÒÓÔÕÖØŌŎŐƟƠǑǪǬǾȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠỢ PƤṔṖⱣ QɊ RŔŖŘȐȒɌṘṚṜṞⱤꞦ SŚŜŞŠȘṠṢṤṦṨⱾꞨ TŢŤŦƬƮȚȾṪṬṮṰ UÙÚÛÜŨŪŬŮŰƯǕǙǛǓǗȔȖɄṲṴṶṸṺỤỦỨỪỬỮỰ VƲṼṾ WŴẀẂẄẆẈ XẊẌ YÝŶŸƳȲɎẎỲỴỶỸ ZŹŻŽƵẐẒẔⱫ aàáâãäåāăąǎǟǡǻȃȧᶏḁẚạảấầẩẫậắằẳẵặⱥ bƀɓᵬᶀḃḅḇ cçćĉċčƈȼḉꞓꞔ dďđɗᵭᶁᶑḋḍḏḑḓ eèéêëēĕėęěȅȇȩɇᶒḕḗḙḛḝẹẻẽếềểễệ fƒᵮᶂḟꞙ gĝğġģǥǧǵɠᶃḡꞡ hĥħȟḣḥḧḩḫẖⱨꞕ iìíîïĩīĭįǐȉȋɨᶖḭḯỉị jĵǰɉ kķƙǩᶄḱḳḵⱪꝁ lĺļľŀłƚḷḹḻḽⱡ mᵯḿṁṃ nñńņňʼnǹᵰᶇṅṇṉṋꞥ oòóôõöøōŏőơǒǫǭǿȍȏȫȭȯȱɵṍṏṑṓọỏốồổỗộớờởỡợ pƥᵱᵽᶈṕṗ qɋʠ rŕŗřȑȓɍɽᵲᵳᶉṛṝṟꞧ sśŝşšșȿᵴᶊṡṣṥṧṩꞩ tţťŧƫƭțʈᵵṫṭṯṱẗⱦ uùúûüũūŭůűųǚǖưǔǘǜȕȗʉᵾᶙṳṵṷṹṻụủứừửữự vʋᶌṽṿ wŵẁẃẅẇẉẘ xẋẍ yýÿŷƴȳɏẏẙỳỵỷỹ zźżžƶᵶᶎẑẓẕⱬ"
let groups = split(str)
diff --git a/src/testdir/test_registers.vim b/src/testdir/test_registers.vim
index 3615e1e..b30b854 100644
--- a/src/testdir/test_registers.vim
+++ b/src/testdir/test_registers.vim
@@ -1,8 +1,5 @@
" Tests for register operations
-source check.vim
-source view_util.vim
-
" This test must be executed first to check for empty and unset registers.
func Test_aaa_empty_reg_test()
call assert_fails('normal @@', 'E748:')
diff --git a/src/testdir/test_reltime.vim b/src/testdir/test_reltime.vim
index 54104d5..14d0d7e 100644
--- a/src/testdir/test_reltime.vim
+++ b/src/testdir/test_reltime.vim
@@ -1,6 +1,5 @@
" Tests for reltime()
-source check.vim
CheckFeature reltime
func Test_reltime()
diff --git a/src/testdir/test_remote.vim b/src/testdir/test_remote.vim
index fd8b0af..a10cb12 100644
--- a/src/testdir/test_remote.vim
+++ b/src/testdir/test_remote.vim
@@ -1,13 +1,10 @@
" Test for the --remote functionality
-source check.vim
CheckFeature clientserver
CheckFeature terminal
-source shared.vim
source screendump.vim
source mouse.vim
-source term_util.vim
let s:remote_works = 0
let s:skip = 'Skipped: --remote feature is not possible'
diff --git a/src/testdir/test_rename.vim b/src/testdir/test_rename.vim
index 26efe5c..b1264a6 100644
--- a/src/testdir/test_rename.vim
+++ b/src/testdir/test_rename.vim
@@ -1,7 +1,5 @@
" Test rename()
-source shared.vim
-
func Test_rename_file_to_file()
call writefile(['foo'], 'Xrename1')
diff --git a/src/testdir/test_restricted.vim b/src/testdir/test_restricted.vim
index d01406e..3099dfe 100644
--- a/src/testdir/test_restricted.vim
+++ b/src/testdir/test_restricted.vim
@@ -1,7 +1,5 @@
" Test for "rvim" or "vim -Z"
-source shared.vim
-
"if has('win32') && has('gui')
" " Win32 GUI shows a dialog instead of displaying the error in the last line.
" finish
diff --git a/src/testdir/test_retab.vim b/src/testdir/test_retab.vim
index a4f9505..8cd6f77 100644
--- a/src/testdir/test_retab.vim
+++ b/src/testdir/test_retab.vim
@@ -1,7 +1,5 @@
" Test :retab
-source check.vim
-
func SetUp()
new
call setline(1, "\ta \t b c ")
diff --git a/src/testdir/test_ruby.vim b/src/testdir/test_ruby.vim
index d4ff8e0..e5af665 100644
--- a/src/testdir/test_ruby.vim
+++ b/src/testdir/test_ruby.vim
@@ -1,6 +1,5 @@
" Tests for ruby interface
-source check.vim
CheckFeature ruby
func Test_ruby_change_buffer()
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index 7573db9..b4780eb 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -1,6 +1,5 @@
" Test for 'scroll', 'scrolloff', 'smoothscroll', etc.
-source check.vim
source screendump.vim
source mouse.vim
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 446d5ec..2921e19 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -1,8 +1,6 @@
" Test for the search command
-source shared.vim
source screendump.vim
-source check.vim
func Test_search_cmdline()
CheckOption incsearch
diff --git a/src/testdir/test_search_stat.vim b/src/testdir/test_search_stat.vim
index c8e055d..72d4bcd 100644
--- a/src/testdir/test_search_stat.vim
+++ b/src/testdir/test_search_stat.vim
@@ -1,6 +1,5 @@
" Tests for search_stats, when "S" is not in 'shortmess'
-source check.vim
source screendump.vim
func Test_search_stat()
diff --git a/src/testdir/test_selectmode.vim b/src/testdir/test_selectmode.vim
index 63aa0b9..705c4ce 100644
--- a/src/testdir/test_selectmode.vim
+++ b/src/testdir/test_selectmode.vim
@@ -1,7 +1,6 @@
" Test for Select-mode
" This only works for Unix in a terminal
-source check.vim
CheckNotGui
CheckUnix
diff --git a/src/testdir/test_set.vim b/src/testdir/test_set.vim
index f38ac33..199cdd4 100644
--- a/src/testdir/test_set.vim
+++ b/src/testdir/test_set.vim
@@ -1,7 +1,5 @@
" Tests for the :set command
-source check.vim
-
function Test_set_backslash()
let isk_save = &isk
diff --git a/src/testdir/test_sha256.vim b/src/testdir/test_sha256.vim
index a1bec97..3db1b2a 100644
--- a/src/testdir/test_sha256.vim
+++ b/src/testdir/test_sha256.vim
@@ -1,6 +1,5 @@
" Tests for the sha256() function.
-source check.vim
CheckFeature cryptv
CheckFunction sha256
diff --git a/src/testdir/test_shell.vim b/src/testdir/test_shell.vim
index 667b158..647d348 100644
--- a/src/testdir/test_shell.vim
+++ b/src/testdir/test_shell.vim
@@ -1,9 +1,6 @@
" Test for the shell related options ('shell', 'shellcmdflag', 'shellpipe',
" 'shellquote', 'shellredir', 'shellxescape', and 'shellxquote')
-source check.vim
-source shared.vim
-
func Test_shell_options()
if has('win32')
" FIXME: This test is flaky on MS-Windows.
diff --git a/src/testdir/test_shift.vim b/src/testdir/test_shift.vim
index f31c5a1..da9a006 100644
--- a/src/testdir/test_shift.vim
+++ b/src/testdir/test_shift.vim
@@ -1,7 +1,5 @@
" Test shifting lines with :> and :<
-source check.vim
-
func Test_ex_shift_right()
set shiftwidth=2
diff --git a/src/testdir/test_shortpathname.vim b/src/testdir/test_shortpathname.vim
index 0c41692..b3d7b82 100644
--- a/src/testdir/test_shortpathname.vim
+++ b/src/testdir/test_shortpathname.vim
@@ -4,7 +4,6 @@
set encoding=utf-8
scriptencoding utf-8
-source check.vim
CheckMSWindows
func TestIt(file, bits, expected)
diff --git a/src/testdir/test_signals.vim b/src/testdir/test_signals.vim
index 4b6c734..3515600 100644
--- a/src/testdir/test_signals.vim
+++ b/src/testdir/test_signals.vim
@@ -1,12 +1,7 @@
" Test signal handling.
-source check.vim
-source term_util.vim
-
CheckUnix
-source shared.vim
-
" Check whether a signal is available on this system.
func HasSignal(signal)
let signals = system('kill -l')
diff --git a/src/testdir/test_signs.vim b/src/testdir/test_signs.vim
index e66e6fa..78988b2 100644
--- a/src/testdir/test_signs.vim
+++ b/src/testdir/test_signs.vim
@@ -1,6 +1,5 @@
" Test for signs
-source check.vim
CheckFeature signs
source screendump.vim
diff --git a/src/testdir/test_sort.vim b/src/testdir/test_sort.vim
index 14a70cf..60b0212 100644
--- a/src/testdir/test_sort.vim
+++ b/src/testdir/test_sort.vim
@@ -1,7 +1,5 @@
" Tests for the "sort()" function and for the ":sort" command.
-source check.vim
-
func Compare1(a, b) abort
call sort(range(3), 'Compare2')
return a:a - a:b
diff --git a/src/testdir/test_sound.vim b/src/testdir/test_sound.vim
index 401753e..fba904c 100644
--- a/src/testdir/test_sound.vim
+++ b/src/testdir/test_sound.vim
@@ -1,8 +1,5 @@
" Tests for the sound feature
-source check.vim
-source shared.vim
-
CheckFeature sound
func PlayCallback(id, result)
diff --git a/src/testdir/test_source.vim b/src/testdir/test_source.vim
index 55b2fff..b7b0d11 100644
--- a/src/testdir/test_source.vim
+++ b/src/testdir/test_source.vim
@@ -1,8 +1,5 @@
" Tests for the :source command.
-source check.vim
-source view_util.vim
-
func Test_source_autocmd()
call writefile([
\ 'let did_source = 1',
diff --git a/src/testdir/test_source_utf8.vim b/src/testdir/test_source_utf8.vim
index bd7cd8d..1375816 100644
--- a/src/testdir/test_source_utf8.vim
+++ b/src/testdir/test_source_utf8.vim
@@ -1,7 +1,5 @@
" Test the :source! command
-source check.vim
-
func Test_source_utf8()
" check that sourcing a script with 0x80 as second byte works
new
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 692e191..0d8ec99 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -1,11 +1,9 @@
" Test spell checking
" Note: this file uses latin1 encoding, but is used with utf-8 encoding.
-source check.vim
CheckFeature spell
source screendump.vim
-source view_util.vim
func TearDown()
set nospell
diff --git a/src/testdir/test_spell_utf8.vim b/src/testdir/test_spell_utf8.vim
index bb2c354..2a5e809 100644
--- a/src/testdir/test_spell_utf8.vim
+++ b/src/testdir/test_spell_utf8.vim
@@ -1,6 +1,5 @@
" Test for spell checking with 'encoding' set to utf-8
-source check.vim
CheckFeature spell
scriptencoding utf-8
diff --git a/src/testdir/test_spellfile.vim b/src/testdir/test_spellfile.vim
index dd12698..b72974e 100644
--- a/src/testdir/test_spellfile.vim
+++ b/src/testdir/test_spellfile.vim
@@ -1,8 +1,5 @@
" Test for commands that operate on the spellfile.
-source shared.vim
-source check.vim
-
CheckFeature spell
CheckFeature syntax
diff --git a/src/testdir/test_spellrare.vim b/src/testdir/test_spellrare.vim
index ceb35cb..9dcd12c 100644
--- a/src/testdir/test_spellrare.vim
+++ b/src/testdir/test_spellrare.vim
@@ -1,6 +1,5 @@
" Test spell checking
-source check.vim
CheckFeature spell
" Test spellbadword() with argument, specifically to move to "rare" words
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index c56173e..cd99355 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -1,9 +1,6 @@
" Tests for startup.
-source shared.vim
source screendump.vim
-source term_util.vim
-source check.vim
" Check that loading startup.vim works.
func Test_startup_script()
diff --git a/src/testdir/test_startup_utf8.vim b/src/testdir/test_startup_utf8.vim
index 9377667..f31c150 100644
--- a/src/testdir/test_startup_utf8.vim
+++ b/src/testdir/test_startup_utf8.vim
@@ -1,7 +1,5 @@
" Tests for startup using utf-8.
-source check.vim
-source shared.vim
source screendump.vim
func Test_read_stdin_utf8()
diff --git a/src/testdir/test_stat.vim b/src/testdir/test_stat.vim
index ed123e4..b616870 100644
--- a/src/testdir/test_stat.vim
+++ b/src/testdir/test_stat.vim
@@ -1,7 +1,5 @@
" Tests for stat functions and checktime
-source check.vim
-
func CheckFileTime(doSleep)
let fnames = ['Xtest1.tmp', 'Xtest2.tmp', 'Xtest3.tmp']
let times = []
diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim
index f2204db..7883af3 100644
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -3,8 +3,6 @@
" Not tested yet:
" %N
-source view_util.vim
-source check.vim
source screendump.vim
func SetUp()
diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim
index 21527db..ef352b9 100644
--- a/src/testdir/test_substitute.vim
+++ b/src/testdir/test_substitute.vim
@@ -1,7 +1,5 @@
" Tests for the substitute (:s) command
-source shared.vim
-source check.vim
source screendump.vim
" NOTE: This needs to be the first test to be
diff --git a/src/testdir/test_suspend.vim b/src/testdir/test_suspend.vim
index 5175c0f..ae05dd2 100644
--- a/src/testdir/test_suspend.vim
+++ b/src/testdir/test_suspend.vim
@@ -1,9 +1,5 @@
" Test :suspend
-source check.vim
-source term_util.vim
-source shared.vim
-
func CheckSuspended(buf, fileExists)
call WaitForAssert({-> assert_match('[$#] $', term_getline(a:buf, '.'))})
diff --git a/src/testdir/test_swap.vim b/src/testdir/test_swap.vim
index 4ba7bb6..b599bf7 100644
--- a/src/testdir/test_swap.vim
+++ b/src/testdir/test_swap.vim
@@ -1,9 +1,5 @@
" Tests for the swap feature
-source check.vim
-source shared.vim
-source term_util.vim
-
func s:swapname()
return trim(execute('swapname'))
endfunc
diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim
index d152ec5..6c56ceb 100644
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -1,9 +1,7 @@
" Test for syntax and syntax iskeyword option
-source check.vim
CheckFeature syntax
-source view_util.vim
source screendump.vim
func GetSyntaxItem(pat)
diff --git a/src/testdir/test_system.vim b/src/testdir/test_system.vim
index 879eaed..4e0c349 100644
--- a/src/testdir/test_system.vim
+++ b/src/testdir/test_system.vim
@@ -1,8 +1,5 @@
" Tests for system() and systemlist()
-source shared.vim
-source check.vim
-
func Test_System()
if !has('win32')
call assert_equal("123\n", system('echo 123'))
diff --git a/src/testdir/test_tabline.vim b/src/testdir/test_tabline.vim
index 3cba2aa..d00626a 100644
--- a/src/testdir/test_tabline.vim
+++ b/src/testdir/test_tabline.vim
@@ -1,8 +1,5 @@
" Test for tabline
-source shared.vim
-source view_util.vim
-source check.vim
source screendump.vim
func TablineWithCaughtError()
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim
index 0e219e2..a99753e 100644
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -1,7 +1,6 @@
" Tests for tabpage
source screendump.vim
-source check.vim
function Test_tabpage()
CheckFeature quickfix
diff --git a/src/testdir/test_tabpanel.vim b/src/testdir/test_tabpanel.vim
index 4d2fca1..257c38d 100644
--- a/src/testdir/test_tabpanel.vim
+++ b/src/testdir/test_tabpanel.vim
@@ -1,6 +1,5 @@
" Tests for tabpanel
-source check.vim
source screendump.vim
CheckFeature tabpanel
diff --git a/src/testdir/test_tagfunc.vim b/src/testdir/test_tagfunc.vim
index 96ed109..cceaf45 100644
--- a/src/testdir/test_tagfunc.vim
+++ b/src/testdir/test_tagfunc.vim
@@ -1,7 +1,6 @@
" Test 'tagfunc'
import './vim9.vim' as v9
-source check.vim
source screendump.vim
func TagFunc(pat, flag, info)
diff --git a/src/testdir/test_tagjump.vim b/src/testdir/test_tagjump.vim
index f53d9b8..1947ab2 100644
--- a/src/testdir/test_tagjump.vim
+++ b/src/testdir/test_tagjump.vim
@@ -1,6 +1,5 @@
" Tests for tagjump (tags and special searches)
-source check.vim
source screendump.vim
" SEGV occurs in older versions. (At least 7.4.1748 or older)
diff --git a/src/testdir/test_taglist.vim b/src/testdir/test_taglist.vim
index c5c7df2..5a94604 100644
--- a/src/testdir/test_taglist.vim
+++ b/src/testdir/test_taglist.vim
@@ -1,8 +1,5 @@
" test taglist(), tagfiles() functions and :tags command
-source check.vim
-source view_util.vim
-
func Test_taglist()
call writefile([
\ "FFoo\tXfoo\t1",
diff --git a/src/testdir/test_tcl.vim b/src/testdir/test_tcl.vim
index 68a6d63..a60c909 100644
--- a/src/testdir/test_tcl.vim
+++ b/src/testdir/test_tcl.vim
@@ -1,6 +1,5 @@
" Tests for the Tcl interface.
-source check.vim
CheckFeature tcl
" Helper function as there is no builtin tcleval() function similar
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index 8fe77b0..e44ca46 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -1,14 +1,10 @@
" Tests for decoding escape sequences sent by the terminal.
" This only works for Unix in a terminal
-source check.vim
CheckNotGui
CheckUnix
-source shared.vim
source mouse.vim
-source view_util.vim
-source term_util.vim
func s:TermGuiColorsTest()
CheckNotMSWindows
diff --git a/src/testdir/test_termencoding.vim b/src/testdir/test_termencoding.vim
index a45ff84..86b7341 100644
--- a/src/testdir/test_termencoding.vim
+++ b/src/testdir/test_termencoding.vim
@@ -1,8 +1,6 @@
" Test for setting 'encoding' to something else than the terminal uses, then
" setting 'termencoding' to make it work.
-source check.vim
-
" This only works with "iconv".
CheckFeature iconv
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 7476b49..7e088b2 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -2,13 +2,10 @@
" This is split in two, because it can take a lot of time.
" See test_terminal2.vim and test_terminal3.vim for further tests.
-source check.vim
CheckFeature terminal
-source shared.vim
source screendump.vim
source mouse.vim
-source term_util.vim
let s:python = PythonProg()
let $PROMPT_COMMAND=''
diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim
index 195d0ba..996cd98 100644
--- a/src/testdir/test_terminal2.vim
+++ b/src/testdir/test_terminal2.vim
@@ -2,13 +2,10 @@
" This is split in two, because it can take a lot of time.
" See test_terminal.vim and test_terminal3.vim for further tests.
-source check.vim
CheckFeature terminal
-source shared.vim
source screendump.vim
source mouse.vim
-source term_util.vim
let $PROMPT_COMMAND=''
diff --git a/src/testdir/test_terminal3.vim b/src/testdir/test_terminal3.vim
index 7a2ecdb..e86fdf0 100644
--- a/src/testdir/test_terminal3.vim
+++ b/src/testdir/test_terminal3.vim
@@ -2,13 +2,10 @@
" This is split in two, because it can take a lot of time.
" See test_terminal.vim and test_terminal2.vim for further tests.
-source check.vim
CheckFeature terminal
-source shared.vim
source screendump.vim
source mouse.vim
-source term_util.vim
import './vim9.vim' as v9
diff --git a/src/testdir/test_terminal_fail.vim b/src/testdir/test_terminal_fail.vim
index e430bfe..0ee00a1 100644
--- a/src/testdir/test_terminal_fail.vim
+++ b/src/testdir/test_terminal_fail.vim
@@ -2,7 +2,6 @@
" leaks under valgrind. That is because when fork/exec fails memory is not
" freed. Since the process exits right away it's not a real leak.
-source check.vim
CheckFeature terminal
source shared.vim
diff --git a/src/testdir/test_textformat.vim b/src/testdir/test_textformat.vim
index e31ea22..f4dedfa 100644
--- a/src/testdir/test_textformat.vim
+++ b/src/testdir/test_textformat.vim
@@ -1,7 +1,5 @@
" Tests for the various 'formatoptions' settings
-source check.vim
-
func Test_text_format()
enew!
diff --git a/src/testdir/test_textobjects.vim b/src/testdir/test_textobjects.vim
index 2622b06..320cd16 100644
--- a/src/testdir/test_textobjects.vim
+++ b/src/testdir/test_textobjects.vim
@@ -1,7 +1,5 @@
" Test for textobjects
-source check.vim
-
func CpoM(line, useM, expected)
new
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index bcf83ca..856a526 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -1,7 +1,6 @@
" Tests for defining text property types and adding text properties to the
" buffer.
-source check.vim
CheckFeature textprop
source screendump.vim
diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim
index d2f621c..0f9fddb 100644
--- a/src/testdir/test_timers.vim
+++ b/src/testdir/test_timers.vim
@@ -1,11 +1,8 @@
" Test for timers
-source check.vim
CheckFeature timers
source screendump.vim
-source shared.vim
-source term_util.vim
func SetUp()
" The tests here use timers, thus are sensitive to timing.
diff --git a/src/testdir/test_true_false.vim b/src/testdir/test_true_false.vim
index 2b27ba7..03e0288 100644
--- a/src/testdir/test_true_false.vim
+++ b/src/testdir/test_true_false.vim
@@ -1,7 +1,5 @@
" Test behavior of boolean-like values.
-source check.vim
-
" Test what is explained at ":help TRUE" and ":help FALSE".
func Test_if()
if v:false
diff --git a/src/testdir/test_trycatch.vim b/src/testdir/test_trycatch.vim
index 31ac6f8..1fde607 100644
--- a/src/testdir/test_trycatch.vim
+++ b/src/testdir/test_trycatch.vim
@@ -1,8 +1,6 @@
" Test try-catch-finally exception handling
" Most of this was formerly in test49.
-source check.vim
-source shared.vim
import './vim9.vim' as v9
"-------------------------------------------------------------------------------
diff --git a/src/testdir/test_undo.vim b/src/testdir/test_undo.vim
index af6cefe..b4506cb 100644
--- a/src/testdir/test_undo.vim
+++ b/src/testdir/test_undo.vim
@@ -3,7 +3,6 @@
" undo-able pieces. Do that by setting 'undolevels'.
" Also tests :earlier and :later.
-source check.vim
source screendump.vim
func Test_undotree()
diff --git a/src/testdir/test_uniq.vim b/src/testdir/test_uniq.vim
index a60fd49..9029ea5 100644
--- a/src/testdir/test_uniq.vim
+++ b/src/testdir/test_uniq.vim
@@ -1,7 +1,5 @@
" Tests for the ":uniq" command.
-source check.vim
-
" Tests for the ":uniq" command.
func Test_uniq_cmd()
let tests = [
diff --git a/src/testdir/test_user_func.vim b/src/testdir/test_user_func.vim
index b9f6a40..8a32afe 100644
--- a/src/testdir/test_user_func.vim
+++ b/src/testdir/test_user_func.vim
@@ -3,8 +3,6 @@
" Also test that a builtin function cannot be replaced.
" Also test for regression when calling arbitrary expression.
-source check.vim
-source shared.vim
import './vim9.vim' as v9
func Table(title, ...)
diff --git a/src/testdir/test_usercommands.vim b/src/testdir/test_usercommands.vim
index d950308..e61a9ce 100644
--- a/src/testdir/test_usercommands.vim
+++ b/src/testdir/test_usercommands.vim
@@ -2,7 +2,6 @@
import './vim9.vim' as v9
-source check.vim
source screendump.vim
" Test for <mods> in user defined commands
diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim
index 61ea0d0..9c2a749 100644
--- a/src/testdir/test_utf8.vim
+++ b/src/testdir/test_utf8.vim
@@ -1,7 +1,5 @@
" Tests for Unicode manipulations
-source check.vim
-source view_util.vim
source screendump.vim
" Visual block Insert adjusts for multi-byte char
diff --git a/src/testdir/test_vartabs.vim b/src/testdir/test_vartabs.vim
index bae00dd..28b95ab 100644
--- a/src/testdir/test_vartabs.vim
+++ b/src/testdir/test_vartabs.vim
@@ -1,10 +1,7 @@
" Test for variable tabstops
-source check.vim
CheckFeature vartabs
-source view_util.vim
-
func s:compare_lines(expect, actual)
call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
endfunc
diff --git a/src/testdir/test_version.vim b/src/testdir/test_version.vim
index 958c126..40e5192 100644
--- a/src/testdir/test_version.vim
+++ b/src/testdir/test_version.vim
@@ -1,8 +1,5 @@
" Test :version Ex command
-so check.vim
-so shared.vim
-
func Test_version()
" version should always return the same string.
let v1 = execute('version')
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim
index 3b08384..dde750b 100644
--- a/src/testdir/test_vim9_assign.vim
+++ b/src/testdir/test_vim9_assign.vim
@@ -1,8 +1,6 @@
" Test Vim9 assignments
-source check.vim
import './vim9.vim' as v9
-source term_util.vim
let s:appendToMe = 'xxx'
let s:addToMe = 111
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim
index 2ad4a85..a653c7c 100644
--- a/src/testdir/test_vim9_builtin.vim
+++ b/src/testdir/test_vim9_builtin.vim
@@ -1,6 +1,5 @@
" Test using builtin functions in the Vim9 script language.
-source check.vim
source screendump.vim
import './vim9.vim' as v9
diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim
index 3ba467b..e08c40c 100644
--- a/src/testdir/test_vim9_class.vim
+++ b/src/testdir/test_vim9_class.vim
@@ -1,6 +1,5 @@
" Test Vim9 classes
-source check.vim
import './vim9.vim' as v9
def Test_class_basic()
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index d38e1c8..0d525b4 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -1,9 +1,6 @@
" Test commands that are not compiled in a :def function
-source check.vim
import './vim9.vim' as v9
-source term_util.vim
-source view_util.vim
def Test_vim9cmd()
var lines =<< trim END
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index e98ab75..f1059fb 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -1,6 +1,5 @@
" Test the :disassemble command, and compilation as a side effect
-source check.vim
import './vim9.vim' as v9
func s:NotCompiled()
diff --git a/src/testdir/test_vim9_enum.vim b/src/testdir/test_vim9_enum.vim
index de26259..0ce7dad 100644
--- a/src/testdir/test_vim9_enum.vim
+++ b/src/testdir/test_vim9_enum.vim
@@ -1,6 +1,5 @@
" Test Vim9 enums
-source check.vim
import './vim9.vim' as v9
" Test for parsing an enum definition
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index b0a623a..22d6681 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -1,6 +1,5 @@
" Tests for Vim9 script expressions
-source check.vim
import './vim9.vim' as v9
let g:cond = v:false
diff --git a/src/testdir/test_vim9_fails.vim b/src/testdir/test_vim9_fails.vim
index 9d43370..62d6f97 100644
--- a/src/testdir/test_vim9_fails.vim
+++ b/src/testdir/test_vim9_fails.vim
@@ -1,8 +1,6 @@
" Test for Vim9 script with failures, causing memory leaks to be reported.
" The leaks happen after a fork() and can be ignored.
-source check.vim
-
def Test_assignment()
if !has('channel')
CheckFeature channel
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index 1d5de42..42b8b4f 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
Binary files differ
diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim
index 1c8136a..0eeaa7f 100644
--- a/src/testdir/test_vim9_import.vim
+++ b/src/testdir/test_vim9_import.vim
@@ -1,8 +1,6 @@
" Test import/export of the Vim9 script language.
" Also the autoload mechanism.
-source check.vim
-source term_util.vim
import './vim9.vim' as v9
let s:export_script_lines =<< trim END
diff --git a/src/testdir/test_vim9_python3.vim b/src/testdir/test_vim9_python3.vim
index 697b368..9817dd8 100644
--- a/src/testdir/test_vim9_python3.vim
+++ b/src/testdir/test_vim9_python3.vim
@@ -1,5 +1,4 @@
-source check.vim
import './vim9.vim' as v9
CheckFeature python3
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index d0bedf2..52d64c6 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -1,10 +1,7 @@
" Test various aspects of the Vim9 script language.
-source check.vim
-source term_util.vim
import './vim9.vim' as v9
source screendump.vim
-source shared.vim
def Test_vim9script_feature()
# example from the help, here the feature is always present
diff --git a/src/testdir/test_vim9_typealias.vim b/src/testdir/test_vim9_typealias.vim
index 6cc0470..9d7bd89 100644
--- a/src/testdir/test_vim9_typealias.vim
+++ b/src/testdir/test_vim9_typealias.vim
@@ -1,6 +1,5 @@
" Test Vim9 type aliases
-source check.vim
import './vim9.vim' as v9
" Test for :type command to create type aliases
diff --git a/src/testdir/test_viminfo.vim b/src/testdir/test_viminfo.vim
index 2bbca3e..e3767e9 100644
--- a/src/testdir/test_viminfo.vim
+++ b/src/testdir/test_viminfo.vim
@@ -1,9 +1,5 @@
" Test for reading and writing .viminfo
-source check.vim
-source term_util.vim
-source shared.vim
-
func Test_viminfo_read_and_write()
" First clear 'history', so that "hislen" is zero. Then set it again,
" simulating Vim starting up.
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim
index 16dd70c..e1000fb 100644
--- a/src/testdir/test_vimscript.vim
+++ b/src/testdir/test_vimscript.vim
@@ -2,8 +2,6 @@
" Most of this was formerly in test49.vim (developed by Servatius Brandt
" <Servatius.Brandt@fujitsu-siemens.com>)
-source check.vim
-source shared.vim
source script_util.vim
"-------------------------------------------------------------------------------
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim
index 2665faa..df9fe99 100644
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -1,7 +1,5 @@
" Tests for various Visual modes.
-source shared.vim
-source check.vim
source screendump.vim
import './vim9.vim' as v9
diff --git a/src/testdir/test_wayland.vim b/src/testdir/test_wayland.vim
index 5dd6065..e72a37f 100644
--- a/src/testdir/test_wayland.vim
+++ b/src/testdir/test_wayland.vim
@@ -1,5 +1,3 @@
-source check.vim
-source shared.vim
source window_manager.vim
CheckFeature wayland
diff --git a/src/testdir/test_winbar.vim b/src/testdir/test_winbar.vim
index 954c3e0..f6185f8 100644
--- a/src/testdir/test_winbar.vim
+++ b/src/testdir/test_winbar.vim
@@ -1,9 +1,7 @@
" Test WinBar
-source check.vim
CheckFeature menu
-source shared.vim
source screendump.vim
func Test_add_remove_menu()
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index 4e02f00..bc1aaa9 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -1,6 +1,5 @@
" Tests for window cmd (:wincmd, :split, :vsplit, :resize and etc...)
-source check.vim
source screendump.vim
func Test_window_cmd_ls0_with_split()
diff --git a/src/testdir/test_window_id.vim b/src/testdir/test_window_id.vim
index 396a49b..5401b5f 100644
--- a/src/testdir/test_window_id.vim
+++ b/src/testdir/test_window_id.vim
@@ -1,7 +1,5 @@
" Test using the window ID.
-source check.vim
-
func Test_win_getid()
edit one
let id1 = win_getid()
diff --git a/src/testdir/test_windows_home.vim b/src/testdir/test_windows_home.vim
index ceed25a..4bacd3a 100644
--- a/src/testdir/test_windows_home.vim
+++ b/src/testdir/test_windows_home.vim
@@ -1,6 +1,5 @@
" Test for $HOME on Windows.
-source check.vim
CheckMSWindows
let s:env = {}
diff --git a/src/testdir/test_winfixbuf.vim b/src/testdir/test_winfixbuf.vim
index 2d4eaf6..a553799 100644
--- a/src/testdir/test_winfixbuf.vim
+++ b/src/testdir/test_winfixbuf.vim
@@ -1,8 +1,5 @@
" Test 'winfixbuf'
-source check.vim
-source shared.vim
-
" Find the number of open windows in the current tab
func s:get_windows_count()
return tabpagewinnr(tabpagenr(), '$')
diff --git a/src/testdir/test_writefile.vim b/src/testdir/test_writefile.vim
index 600c36d..51c55d2 100644
--- a/src/testdir/test_writefile.vim
+++ b/src/testdir/test_writefile.vim
@@ -1,8 +1,5 @@
" Tests for the writefile() function and some :write commands.
-source check.vim
-source term_util.vim
-
func Test_writefile()
let f = tempname()
call writefile(["over", "written"], f, "bD")
diff --git a/src/testdir/test_xdg.vim b/src/testdir/test_xdg.vim
index b7abd04..218714d 100644
--- a/src/testdir/test_xdg.vim
+++ b/src/testdir/test_xdg.vim
@@ -1,8 +1,5 @@
" Tests for the XDG feature
-source check.vim
-source shared.vim
-
func s:get_rcs()
let rcs = {
\ 'file1': { 'path': '~/.vimrc', 'dir': expand('~/.vim/') },
diff --git a/src/testdir/test_xxd.vim b/src/testdir/test_xxd.vim
index 7c3011f..b2ef4e5 100644
--- a/src/testdir/test_xxd.vim
+++ b/src/testdir/test_xxd.vim
@@ -1,6 +1,5 @@
" Test for the xxd command
-source check.vim
source screendump.vim
if empty($XXD) && executable('..\xxd\xxd.exe')
diff --git a/src/testdir/window_manager.vim b/src/testdir/window_manager.vim
index 36fe340..7a3c0c0 100644
--- a/src/testdir/window_manager.vim
+++ b/src/testdir/window_manager.vim
@@ -1,6 +1,3 @@
-source check.vim
-source shared.vim
-
CheckFeature job
CheckUnix
diff --git a/src/version.c b/src/version.c
index 0ae7983..470104c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -720,6 +720,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1524,
+/**/
1523,
/**/
1522,