Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.
Closes https://github.com/neovim/neovim/issues/27004.
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:
1. msgpackparse() will show internal error: hash_add() in case of duplicate
keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
expected. Test was still functioning somehow though. Currently fixed.
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
vim-patch:35e7594
35e7594dd4
"Add missing test files from 7.4.634 to the repository."
The discrepancy between the expected getpos() result of the old test
[0, 15, 2, 0] and the converted test [0, 3, 2, 0] is just a matter of how
the buffer is constructed: in the old Vim test the buffer has a bunch of
junk at the top.
The central purpose of the test is to verify that the getpost("'a") does
*not* return [0, 0, 0, 0].