Age | Commit message (Collapse) | Author |
|
Problem: tests: avoid error when no swap files exist
Solution: use unlet! so that no error message is reported
in case the variable does not exists
When s:GetSwapFileList() does not find any swapfiles, it will return an
empty list []. This means, that the variable 'name' will not be
declared, cause the following unlet command to fail and causing a 1 sec
delay on running the tests.
So let's instead use the :unlet! command which simply skips reporting an
error when the variable given as parameter does not exists.
closes: #13396
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: tests: checking for swap files takes time
Solution: don't check for swap files when test has been skipped
Check for swap files takes a considerable about of time, so don't do
that for skipped tests to avoid wasting time.
closes: #13371
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Tests may leave leftover files around
Solution: Clean up tests and remove files
There were a few failures in 'linux (huge, gcc, testgui, true, true)'
e.g. here: https://github.com/vim/vim/actions/runs/5497376153/jobs/10018060156
,----
| Error detected while processing command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[585]..function RunTheTest[54]..Test_lvimgrep_crash[16]..TestTimeout[12]..VimLeavePre Autocommands for "*"..function EarlyExit[7]..FinishTesting:
| line 70:
| E445: Other window contains changes
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txtmalloc(): unsorted double linked list corrupted
`----
Which is puzzling, because the Xtest_stable_xxd file should have been
long gone after test_crypt.vim is run (and definitely no longer be
staying around in test_quickfix.vim).
So try to clean up properly after a test script is run, just in case any
X<file> is still around. During testing, a found a few leftover files,
which I also fixed in the relevant test-file.
Unfortunately, the test workflow 'linux (huge, gcc, testgui, true,
true)' now seems to fail with 'E1230: Encryption: sodium_mlock()' in
test_crypt.vim. Hopefully this is only temporary.
|
|
Problem: Test may run into timeout when using valgrind.
Solution: Use a longer timeout when using valgrind.
|
|
Problem: Errors from the codestyle test are a bit confusing.
Solution: Use assert_report() with a clearer message. Avoid a warning for
an existing swap file.
|
|
Problem: Code style is not check in test scripts.
Solution: Add basic code style check for test files.
|
|
Problem: Reporting swap file when windows are split.
Solution: Close extra windows after running a test.
|
|
Problem: Test trips over g:name.
Solution: Delete g:name after using it.
|
|
Problem: Tests call GetSwapFileList() before it is defined.
Solution: Move the call to after defining the function. (Christopher
Plewright)
|
|
Problem: Tests may get stuck in buffer with swap file.
Solution: Bail out when bwipe! doesn't get another buffer.
|
|
Problem: Stray warnings for existing swap files.
Solution: Wipe out the buffer until it has no name and no swap file.
|
|
Problem: There is no way to get a list of swap file names.
Solution: Add the swapfilelist() function. Use it in the test script to
clean up. Remove deleting individual swap files.
|
|
Problem: When a test gets stuck it just hangs forever.
Solution: Set a timeout of 30 seconds.
|
|
Problem: Elapsed time since testing started is not visible.
Solution: Show the elapsed time while running tests.
|
|
Problem: When a test is slow and CI times out there is no time info.
Solution: Add the elapsed time to the "Executing" message.
|
|
Problem: Terminal test sometimes hangs.
Solution: Add a bit more information to the test output. (issue #11179)
|
|
Problem: No good reason to build without the float feature.
Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
|
|
Problem: Failed flaky tests reports only start time.
Solution: Also report the end time.
|
|
Problem: MS-Windows: "%T" time format does not appear to work.
Solution: Use "%H:%M:%S" instead.
|
|
Problem: A failing flaky test doesn't mention the time.
Solution: Add the time for debugging. Improve error message.
|
|
Problem: No test for text property with column zero.
Solution: Add a test. Add message to assert for no open popups.
|
|
Problem: 'fillchars' cannot have window-local values.
Solution: Make 'fillchars' global-local. (closes #5206)
|
|
Problem: Reproducing memory access errors can be difficult.
Solution: When testing, copy each line to allocated memory, so that valgrind
can detect accessing memory before and/or after it. Fix uncovered
problems.
|
|
Problem: Interrupt not caught in test.
Solution: Consider an exception thrown in the current try/catch when got_int
is set. Also catch early exit when not using try/catch.
|
|
Problem: MS-Windows GUI: empty command may cause a dialog.
Solution: Delete the dialog file. Improve the message.
|
|
Problem: When the GUI shows a dialog tests get stuck.
Solution: Add the --gui-dialog-file argument.
|
|
Problem: Profile completion test sometimes fails.
Solution: Delete the .res file before running tests.
|
|
Problem: When an internal error makes Vim exit the error is not seen.
Solution: Add the error to the test output.
|
|
Problem: ":cd" works differently on MS-Windows.
Solution: Add the 'cdhome' option. (closes #9324)
|
|
Problem: Typos in test files.
Solution: Correct the typos. (Dominique Pellé, closes #9175)
|
|
Problem: CI sometimes fails for MinGW.
Solution: Use backslashes in HandleSwapExists(). (Christian Brabandt,
closes #9078)
|
|
Problem: Test_xrestore sometimes fails.
Solution: Mark the test as flayky. Move marking test as flaky to the test
instead of listing them in runtest.
|
|
Problem: Vim9: check for DO_NOT_FREE_CNT is very slow.
Solution: Move to a separate function so it can be skipped by setting
$TEST_SKIP_PAT.
|
|
Problem: Cannot write a message to the terminal from the GUI.
Solution: Add :echoconsole and use it in the test runner. (issue #7975)
|
|
Problem: Recover test hangs in the GUI.
Solution: Add g:skipped_reason to skip a _nocatch_ test.
|
|
Problem: Some tests fail on Mac.
Solution: Avoid Mac test failures. Add additional test for wildmenu.
(Yegappan Lakshmanan, closes #7341)
|
|
Problem: Vim9: still allows :let for declarations.
Solution: Make the default for v:disallow_let one. It can still be set to
zero to allow for using :let.
|
|
Problem: Try-catch test fails.
Solution: Don't call win_enter(), only call enterering_window().
|
|
Problem: Vim9: Some tests are still using :let.
Solution: Change the last few declarations to use :var.
|
|
Problem: Not all tests are executed on Github Actions.
Solution: Copy "src" to "src2" earlier. Recognize "src2" in a couple more
places. Add two tests to the list of flaky tests. (Ken Takata,
closes #6798)
|
|
Problem: Tiny and small builds have no test coverage.
Solution: Restore tests that do not depend on the +eval feature.
(Ken Takata, closes #6696)
|
|
Problem: No ATTENTION prompt for :vimgrep first match file.
Solution: When there is an existing swap file do not keep the dummy buffer.
(closes #6649)
|
|
Problem: MS-Windows: test log contains escape sequences.
Solution: Do not use t_md and t_me but ANSI escape sequences. (Ken Takata,
closes #6559)
|
|
Problem: Some tests are still old style.
Solution: Convert tests 52 and 70 to new style. (Yegappan Lakshmanan,
closes #6544) Fix error in FinishTesting().
|
|
Problem: Debug backtrace isn't tested much.
Solution: Add more specific tests. (Ben Jackson, closes #6540)
|
|
Problem: MS-Windows: tests may fail due to $PROMPT value.
Solution: Set $PROMPT for testing. (Taro Muraoka, closes #6510)
|
|
Problem: GUI tests sometimes fail because of translations.
Solution: Reload the menus without translation. (Taro Muraoka, closes #6486)
|
|
Problem: Terminal2 test sometimes hangs in the GUI.
Solution: Move some tests to other files to further locate the problem.
Set the GUI to a fixed screen size.
|
|
Problem: Not easy to read the test time in the test output.
Solution: Align the times. Make slow tests bold.
|
|
Problem: Cannot get a list of all popups.
Solution: Add popup_list(). Use it in the test runner.
|