Repository navigation
Test updates - #17677
Test updates#17677chrisbra wants to merge 4 commits into
Conversation
094c9fa to
7cfc2c6
Compare
|
I noticed the testdir folder is a bit messy right now, so decided to move auxiliary scripts below the However I am not completely sure this is a good change, so likely want to get some feedback. I can drop if, if this is not desired. (CI currently fails in the shadowdir test case. I believe that's because CC @dkearns @yegappan @zzzyxwvut for your feedback. |
| @@ -1,5 +1,9 @@ | |||
| source shared.vim | |||
| source term_util.vim | |||
| source util/shared.vim | |||
There was a problem hiding this comment.
Does it work, if you use source ./shared.vim and source ./term_util.vim here?
There was a problem hiding this comment.
no, because this is sourced from testdir/ where Vims current directory is testdir, so ./term_util.vim means trying to access testdir/term_util.vim.
Keeping all the utility scripts separate from the test scripts sounds good to me. |
adjust the cleanup script and get rid of a few more ANSI sequences: ``` 2025-07-05T20:02:47.6350409Z |2hExecuted 171 tests in 4.739708 seconds|31H ``` So adjust the regex to also remove those sequences Signed-off-by: Christian Brabandt <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
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. Also runtest.vim already sources shared.vim, which again sources view_util.vim, so we can don't need to source those two common dependencies in all the other tests And finally: term_util is sourced already in check.vim, so we can drop sourcing it explicitly in each single test. Note: Update test_expand_func had to be updated to account for the changed number of sourced files. Also note: check.vim uses line-continuation so explicitly set cpo option to account for this. Signed-off-by: Christian Brabandt <[email protected]>
src/testdir/ has become a dumping ground mixing test cases with utility functions. Let's fix this by moving all utility functions into the util/ directory Also a few related changes had to be done: - Update Filelist - update README.txt and mention the new directory layout - fix shadowbuild by linking the util directory into the shadow dir Signed-off-by: Christian Brabandt <[email protected]>
Problem: tests: still some ANSI escape sequences in test messages output
Solution: update the cleanup regexp to also handle those ANSI escape
sequences: `<esc>|2h` and `<esc>|31H` like in this log output:
```
2025-07-05T20:02:47.6350409Z <esc>|2hExecuted 171 tests in 4.739708 seconds<esc>|31H
```
related: #17677
Signed-off-by: Christian Brabandt <[email protected]>
Problem: tests: test_clipmethod fails in non X11 environment Solution: test that $DISPLAY is available related: #17677 Signed-off-by: Christian Brabandt <[email protected]>
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 <[email protected]>
|
More compartmentalisation, better navigation. Thank you. |
author Girish Palya <[email protected]> 1751956573 +0200 committer Girish Palya <[email protected]> 1751956573 +0200 M runtime/doc/options.txt Rename option value to convey function better M runtime/doc/options.txt M src/cmdexpand.c M src/option.h M src/optionstr.c M src/testdir/test_cmdline.vim Merge M runtime/doc/options.txt M runtime/doc/options.txt Simplify option value name M runtime/doc/options.txt M src/option.h M src/optionstr.c M src/testdir/test_cmdline.vim Keep alphabetical order in doc M runtime/doc/options.txt Improve doc M runtime/doc/options.txt runtime(doc): fix a few typos introduced in 0ae9e19 Signed-off-by: Christian Brabandt <[email protected]> translation(tr): Update Turkish translations closes: vim#17688 Signed-off-by: Emir SARI <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> runtime(optwin): add missing values for tabpanel option closes: vim#17685 Signed-off-by: RestorerZ <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> patch 9.1.1518: getcompletiontype() may crash Problem: getcompletiontype() crashes when no completion is available (after v9.1.1509). Solution: Don't call set_expand_context() (zeertzjq) fixes: vim#17681 closes: vim#17684 Signed-off-by: zeertzjq <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> runtime(doc): Add documentation style closes: vim#17627 Co-authored-by: Phạm Bình An <[email protected]> Signed-off-by: Damien Lejay <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> patch 9.1.1519: tests: Test_termdebug_decimal_breakpoints() may fail Problem: Test_termdebug_decimal_breakpoints() fails with List index out of range, because when adding the second breakpoint, the cursor is still on the very first line (a header include line) and therefore gdb refuses to set the breakpoint with: `msg="No compiled code for line 1 in file XTD_decimal.c"` Solution: Run the program, so that it will break at the very first defined breakpoint and then once we are in the program, set further breakpoints closes: vim#17689 Signed-off-by: Christian Brabandt <[email protected]> patch 9.1.1520: completion: search completion doesn't handle 'smartcase' well Problem: When using `/` or `?` in command-line mode with 'ignorecase' and 'smartcase' enabled, the completion menu could show items that don't actually match any text in the buffer due to case mismatches Solution: Instead of validating menu items only against the user-typed pattern, the new logic also checks whether the completed item matches actual buffer content. If needed, it retries the match using a lowercased version of the candidate, respecting smartcase semantics. closes: vim#17665 Signed-off-by: Girish Palya <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> patch 9.1.1521: completion: pum does not reset scroll pos on reopen with 'noselect' Problem: When 'wildmode' is set to include "noselect", the popup menu (pum) incorrectly retained its scroll position when reopened. This meant that after scrolling down through the menu with `<C-n>`, reopening the menu (e.g., by retyping the command and triggering completion again) would show the menu starting from the previously scrolled position, rather than from the top. This could confuse users, as the first visible item would not be the first actual match in the list. Solution: Ensure that the popup menu resets its scroll position to the top when reopened (Girish Palya). closes: vim#17673 Signed-off-by: Girish Palya <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> patch 9.1.1522: tests: still some ANSI escape sequences in test output Problem: tests: still some ANSI escape sequences in test messages output Solution: update the cleanup regexp to also handle those ANSI escape sequences: `<esc>|2h` and `<esc>|31H` like in this log output: ``` 2025-07-05T20:02:47.6350409Z <esc>|2hExecuted 171 tests in 4.739708 seconds<esc>|31H ``` related: vim#17677 Signed-off-by: Christian Brabandt <[email protected]> patch 9.1.1523: tests: test_clipmethod fails in non X11 environment Problem: tests: test_clipmethod fails in non X11 environment Solution: test that $DISPLAY is available related: vim#17677 Signed-off-by: Christian Brabandt <[email protected]> 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: vim#17677 Signed-off-by: Christian Brabandt <[email protected]> patch 9.1.1525: tests: testdir/ is a bit messy Problem: tests: testdir is a bit messy Solution: move test scripts into testdir/util/ directory src/testdir/ has become a dumping ground mixing test cases with utility functions. Let's fix this by moving all utility functions into the testdir/util/ directory Also a few related changes had to be done: - Update Filelist - update README.txt and mention the new directory layout - fix shadowbuild by linking the util directory into the shadow dir closes: vim#17677 Signed-off-by: Christian Brabandt <[email protected]> runtime(netrw): restore blank line cleanup after file listing Problem: v182 refactoring removed blank line cleanup (g/^$/d) from s:LocalListing(), causing empty lines between directories and files. Solution: Add the missing cleanup after append() in s:PerformListing() (uma-chan). closes: vim#17672 Co-authored-by: Luca Saccarola <[email protected]> Signed-off-by: uma-chan <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
No description provided.