Commit Graph

17 Commits

Author SHA1 Message Date
zeertzjq
fdb11888f5
vim-patch:9.0.1679: Cleanup Tests from leftover files (#24617)
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.

84bc00e9b5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-09 06:07:23 +08:00
zeertzjq
aba3ceccb7
vim-patch:9.0.1335: no test for bad use of spaces in help files (#24483)
Problem:    No test for bad use of spaces in help files.
Solution:   Add checks for use of spaces in help files.  Ignore intentional
            spaces. (Hirohito Higashi, closes vim/vim#11952)

d950984489

Cherry-pick changes from patch 9.0.1604.

Co-authored-by: h-east <h.east.727@gmail.com>
Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-07-25 20:58:09 +08:00
zeertzjq
dbcd1985d1
vim-patch:8.2.4598: profile completion test sometimes fails (#23208)
Problem:    Profile completion test sometimes fails.
Solution:   Delete the .res file before running tests.

7e0be3ea21

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-20 09:17:33 +08:00
zeertzjq
519acb3ec1 vim-patch:9.0.1034: reporting swap file when windows are split
Problem:    Reporting swap file when windows are split.
Solution:   Close extra windows after running a test.

e5eae82bb7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
b9bf1b1294 vim-patch:9.0.1021: test trips over g:name
Problem:    Test trips over g:name.
Solution:   Delete g:name after using it.

d6e74f5479

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
5f4e0a005b vim-patch:9.0.1020: tests call GetSwapFileList() before it is defined
Problem:    Tests call GetSwapFileList() before it is defined.
Solution:   Move the call to after defining the function. (Christopher
            Plewright)

6572a90287

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
ab7bd119d7 vim-patch:9.0.1012: tests may get stuck in buffer with swap file
Problem:    Tests may get stuck in buffer with swap file.
Solution:   Bail out when bwipe! doesn't get another buffer.

fa2533c8bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
a2f4bad781 vim-patch:9.0.1010: stray warnings for existing swap files
Problem:    Stray warnings for existing swap files.
Solution:   Wipe out the buffer until it has no name and no swap file.

23526d2539

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
85c61d6716 vim-patch:9.0.1007: there is no way to get a list of swap file names
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.

c216a7a21a

vim-patch:9.0.1005: a failed test may leave a swap file behind

Problem:    A failed test may leave a swap file behind.
Solution:   Delete the swap file to avoid another test to fail.  Use another
            file name.

d0f8d39d20

Cherry-pick test_window_cmd.vim changes from patch 8.2.1593.
Remove FUNC_ATTR_UNUSED from eval functions as fptr is always unused.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
d82a6ca72a vim-patch:9.0.0561: when a test gets stuck it just hangs forever
Problem:    When a test gets stuck it just hangs forever.
Solution:   Set a timeout of 30 seconds.

3bcd0ddc2d

Note: This doesn't cause test_timers.vim failures in Nvim because there
is a SetUp() function that calls timer_stopall().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
63432c854f vim-patch:9.0.0560: elapsed time since testing started is not visible
Problem:    Elapsed time since testing started is not visible.
Solution:   Show the elapsed time while running tests.

b9093d5009

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
7592540029 vim-patch:9.0.0545: when a test is slow and CI times out there is no time info
Problem:    When a test is slow and CI times out there is no time info.
Solution:   Add the elapsed time to the "Executing" message.

daaa3d9965

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
db12c61c56 vim-patch:9.0.0514: terminal test sometimes hangs
Problem:    Terminal test sometimes hangs.
Solution:   Add a bit more information to the test output. (issue vim/vim#11179)

a22c56a59a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
ad06c1c1c6 vim-patch:9.0.0426: failed flaky tests reports only start time
Problem:    Failed flaky tests reports only start time.
Solution:   Also report the end time.

65258d36dd

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
c4c5bcd2b2 vim-patch:9.0.0372: MS-Windows: "%T" time format does not appear to work
Problem:    MS-Windows: "%T" time format does not appear to work.
Solution:   Use "%H:%M:%S" instead.

5fbbec180b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
zeertzjq
db6812c444 vim-patch:9.0.0369: a failing flaky test doesn't mention the time
Problem:    A failing flaky test doesn't mention the time.
Solution:   Add the time for debugging.  Improve error message.

06d32a0c17

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:33 +08:00
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