Ensure that
* Shell uses UTF8 input/output mode
* Stderr output is captured, in UTF8
* Program exit codes are correctly captured
Update functional test harness and add tests
for :make command.
Closes#13713
Opt in to this secret world using
set wildchar=0
" already the default, but remove if non-zero existing config:
set wildcharm=0
now you can map 'wildmode' just like any mode:
cnoremap <tab> <c-z>
function! Spacey()
return getcmdline()[-1:] == "/" ? "\<bs>" : ""
endfunc
cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/"
Possibly asked questions:
What about backwards compatibility?
====
Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working.
Doesn't `<c-z>` mean suspend?
====
Not in cmdline mode. If it would then the recommended wildcharm would not
have been `<c-z>` to start with.
My config relies on `:<c-z>` being a synonym to `:<nop>`!
====
just no.
Problem: ruby#Detect() and node#Detect() don't return a [prog, err] pair
which means callers must special-case them.
Solution: align their return signatures with the perl/pythonx providers.
using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
Having the cursor change column can be surprising.
Force startofline in functional and old tests.
Remove the functional breakindent test, as it's a subset of the oldtest one.
Having the cursor change column can be surprising.
Force startofline in functional and old tests.
Remove the functional breakindent test, as it's a subset of the oldtest one.
- We already find ourselves renaming nvim_execute_lua in tests and
scripts, which suggests "exec" is the verb we actually want.
- Add "exec" verb to `:help dev-api`.
- Running out of retries, or unexpected screen state should make the
test FAIL, not ERROR.
- Uses levels to report the location of the caller.
- Improve message with retry-failure (formatting).
Before:
[ RUN ] test: 103.53 ms ERR
test/functional/helpers.lua:388:
retry() attempts: 1
test/functional/ui/screen.lua:587: Row 1 did not match.
Expected:
|*X^ |
|{0:~ }|
|{0:~ }|
| |
Actual:
|*^ |
|{0:~ }|
|{0:~ }|
| |
To print the expect() call that would assert the current screen state, use
screen:snapshot_util(). In case of non-deterministic failures, use
screen:redraw_debug() to show all intermediate screen states.
stack traceback:
test/functional/helpers.lua:388: in function 'retry'
test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
After:
[ RUN ] test: 105.22 ms FAIL
test/functional/test_spec.lua:24: stopping after 1 retry() attempts.
test/functional/test_spec.lua:25: Row 1 did not match.
Expected:
|*X^ |
|{0:~ }|
|{0:~ }|
| |
Actual:
|*^ |
|{0:~ }|
|{0:~ }|
| |
To print the expect() call that would assert the current screen state, use
screen:snapshot_util(). In case of non-deterministic failures, use
screen:redraw_debug() to show all intermediate screen states.
stack traceback:
test/functional/helpers.lua:389: in function 'retry'
test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
- Rename `meth_pcall`.
- Make `pcall_err` raise an error if the function does not fail.
- Add `vim.pesc()` to treat a string as literal where a Lua pattern is
expected.
For debugging failures like:
test/functional/helpers.lua:240: test/functional/ui/screen.lua:898:
bad argument #1 to 'unpack' (table expected, got number)
test/functional/helpers.lua:240: test/functional/ui/screen.lua:708:
attempt to index local 'item' (a number value)
ref #10804
Regardless of the comment "Big timeout for ASAN/valgrind" it would use
10s by default already.
This changes it to use `load_adjust`, which itself is only computed on
CI now, and outside of any tests - since it has side effects when being
used the first time!
The failure seen on AppVeyor:
[ RUN ] jobs can get the pid value using getpid: ERR
test\functional\helpers.lua:167:
==============================================================================
got 0 messages (ignored 0), expected 1
stack traceback:
test\functional\helpers.lua:167: in function 'expect_msg_seq'
test/functional\core\job_spec.lua:288: in function <test/functional\core\job_spec.lua:281>
Log: https://ci.appveyor.com/project/neovim/neovim/builds/26537324/job/y1io66fbx399q7h6?fullLog=true#L6554
* ci: AppVeyor: set GCOV_ERROR_FILE
This prevents the warnings/errors to be spilled into test results,
causing them to fail them, e.g.:
[ FAILED ] C:/projects/neovim/test/functional\core\main_spec.lua @ 97: Command-line option -s errors out when trying to use nonexistent file with -s
C:/projects/neovim/test/functional\core\main_spec.lua:98: Expected objects to be the same.
Passed in:
(string) 'Cannot open for reading: "Xtest-functional-core-main-s.nonexistent": no such file or directory
profiling:C:\projects\neovim\build/src/nvim/CMakeFiles/nvim.dir/buffer.c.gcda:Data file mismatch - some data files may have been concurrently updated without locking support
'
Expected:
(string) 'Cannot open for reading: "Xtest-functional-core-main-s.nonexistent": no such file or directory
'
stack traceback:
C:/projects/neovim/test/functional\core\main_spec.lua:98: in function <C:/projects/neovim/test/functional\core\main_spec.lua:97>
For reference, the locking appears to have been reworked for gcc 9.1 [1].
1: https://github.com/gcc-mirror/gcc/commit/56621355b
helpers.clear: keep GCOV_ERROR_FILE in environment
* ci: AppVeyor: remove MINGW_64 config (used with cov now)
Also:
- run MINGW_64-gcov first, and with PRs, since it provides coverage.
The test.functional.helpers and test.unit.helpers modules now include
all of the public functions from test.helpers, so there is no need to
separately require('test.helpers').