aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/grep_spec.lua
Commit message (Collapse)AuthorAge
* test(env): "uv_os_getenv failed: -4071 EINVAL" #42187Justin M. Keyes2026-10-01
| | | | | | | | | | | | | | | | | | | | | | | Problem: Windows CI fails since f83acfd327e3756c65f69f170055fe18a751f5f2 : the `:grep` test greps the contents of `test/*`, which depends on whatever is in the test files. After that commit, quickfix expands `"$⨯"` in diagnostic_spec.lua as part of a file name, which logs an error: $NVIM_LOG_FILE: D:/a/neovim/neovim/build/nvim.log_ex_cmds ERR 2026-09-30T17:34:03.034 T190.2776.0 os_getenv:98: uv_os_getenv(�) failed: -4071 EINVAL Analysis: `expand_env_esc()` has buggy logic: it reads the name bytewise (not UTF8-aware), so expand_env("$é") looks up "\xC3". while (c-- > 0 && *tail != NUL && vim_isIDc((uint8_t)(*tail))) { *var++ = *tail++; } Solution: In the `:grep` test, grep test/functional/fixtures/bigfile.txt instead of the entire `test/*` contents. This is faster and more predictable.
* test(harness): migrate away from magic globalsJustin M. Keyes2026-07-21
| | | | | | | | | | | | | | | | | | | | | Problem: The magic globals `it`, `describe`, etc., are more trouble than they are worth. - Hooking into `after_each` requires `getfenv()` hacks. - They confuse luals/emmylua, because the top-level `.luarc.json` isn't merged with `test/.luarc.json` (apparently a luals limitation?) - They totally defeat discoverability because the user just has to "know" about the various magic symbols. So they harm DX, which means they serve no purpose at all. Solution: - Expose the test API from `testutil`, so tests can call `t.it()`, `t.describe()`, etc., in the conventional way. - Drop `getfenv()` hacks. - Drop the `setfenv()` injection in `load_chunk`. - Drop `test/_meta.lua`.
* test: feed_command is deprecated #33674Justin M. Keyes2025-04-27
|
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* refactor: format test/*Justin M. Keyes2024-01-03
|
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* functests: Check logs in lua codeZyX2016-06-10
| | | | | | 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.
* test/functional: clean up according to luacheck (part 2)Marco Hinz2015-11-23
|
* test: cover :grepJustin M. Keyes2015-08-11
References #3156