Commit Graph

11 Commits

Author SHA1 Message Date
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00
Sean Dewar
70a68dc2c5
fix(options): disallow empty 'fdc' and 'scl' (#16765)
Empty string values for these options aren't actually allowed, but
check_opt_strings allows empty string options.

It so happens that 'scl' handles empty string like "auto", but empty 'fdc'
causes glitchiness (win_fdccol_count returns an incorrect value).

Just disallow empty string values for these options completely.
2021-12-24 22:30:34 -07:00
Jan Edmund Lazo
a1cdb6ca6a
vim-patch:8.2.2595: setting 'winminheight' may cause 'lines' to change
Problem:    Setting 'winminheight' may cause 'lines' to change.
Solution:   Also take minimal height of other tabpages into account. (vim/vim#7899)
9e813b3dea
2021-03-13 10:16:23 -05:00
Jan Edmund Lazo
f32acc70e8
vim-patch:8.2.2236: 'scroll' option can change when setting the statusline
Problem:    'scroll' option can change when setting the statusline or tabline
            but the option context is not updated.
Solution:   Update the script context when the scroll option is changed as a
            side effect. (Christian Brabandt, closes vim/vim#7533)
746670604a
2021-03-02 00:35:52 -05:00
Jan Edmund Lazo
e50875b3e3
vim-patch:8.2.2560: setting 'winminheigt' does not take tabline into account
Problem:    Setting 'winminheigt' does not take tabline into account.
Solution:   Subtract the tabline from the available height. (closes vim/vim#7899)
39d4cab494

N/A patches for version.c:

vim-patch:8.1.0680: not easy to see what features are unavailable

Problem:    Not easy to see what features are unavailable.
Solution:   Highlight disabled features in the :version output. (Nazri Ramliy,
            closes vim/vim#3756)
c85ffc9dab

vim-patch:8.2.2196: :version output has extra spaces in compile and link command

Problem:    :version output has extra spaces in compile and link command.
Solution:   Adjust QUOTESED. (closes vim/vim#7505)
abcbb0e9ad

vim-patch:8.2.2551: MS-Windows: colors test file is not installed

Problem:    MS-Windows: colors test file is not installed.
Solution:   Also copy runtime/colors/tools. (Ken Takata, closes vim/vim#7902)
d0bce504ec

vim-patch:8.2.2559: MS-Windows: guifont test fails on Windows XP

Problem:    MS-Windows: guifont test fails on Windows XP.
Solution:   Check windowsversion().
3650fd7098
2021-03-01 23:40:39 -05:00
KillTheMule
126b2ca077 test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
ZyX
ff470bb853 functests: Check logs in lua code
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.
2016-06-10 21:50:49 +03:00
watiko
69e5427be1 vim-patch:7.4.915
Problem:    When removing from 'path' and then adding, a comma may go missing.
            (Malcolm Rowe)
Solution:   Fix the check for P_ONECOMMA. (closes #471)

174674743d
2016-02-09 14:44:53 +09:00
Thiago de Arruda
168a46fd31 test: Improve test environment setup and error handling/reporting
During test setup, we used to call a vimscript function(BeforeEachTest) that
attempted to restore Nvim to it's initial state as much as possible in order to
provide a clean environment for running new tests. This approach has proven to
be unreliable, as some tests leave state that can affect other tests, eventually
causing failures that are difficult to debug.

This commit changes the 'clear' function so it will restart Nvim every time it
is called, which is a slower, but more reliable solution that will simplify
spotting bugs in the future.

Some other improvements/fixes were also performed:

- Whenever an error is detected in a handler passed to "run()", the event loop
  will be stopped and the error will be propagated to the main thread.
- Errors and the "cleanup()" function will always send a quit command to the
  current Nvim instance. This should prevent memory starvation when running
  tests under valgrind(where each Nvim instance can consume a lot of memory).
- Fixed a wrong assertion in server_requests_spec.lua. Previously the failure
  was undetected in a notification handler.
- Fixed some tests to expect fully clean registers. The deleted cleanup function
  used to put an empty string in every register, but that resulted in a extra
  line being added.
2014-11-07 00:55:58 -03:00
Thiago de Arruda
117d3db6d7 test: Simplify/fix options_spec.lua
The options_spec.lua suite has one purpose: Check if the :options commands will
throw any exception(:options is implemented by $VIMRUNTIME/optwin.vim). For this
it is best to use the `vim_command` API function since it will automatically
catch exceptions and forward them via msgpack-rpc.

Also, the option window seems to affect other tests, so call `restart` in the
teardown hook.
2014-11-06 04:21:57 -03:00
Rainer Borene
5b7d9bbd08 legacy tests: migrate test_options 2014-11-04 12:57:32 -03:00