aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada
Commit message (Collapse)AuthorAge
* refactor(tests): merge n.spawn/n.spawn_argv into n.new_session #31859Justin M. Keyes2025-01-04
| | | | | | | | | | | | | | | | | Problem: - `n.spawn()` is misleading because it also connects RPC, it's not just "spawning" a process. - It's confusing that `n.spawn()` and `n.spawn_argv()` are separate. Solution: - Replace `n.spawn()`/`n.spawn_argv()` with a single function `n.new_session()`. This name aligns with the existing functions `n.set_session`/`n.get_session`. - Note: removes direct handling of `prepend_argv`, but I doubt that was important or intentional. If callers want to control use of `prepend_argv` then we should add a new flag to `test.session.Opts`. - Move `keep` to first parameter of `n.new_session()`. - Add a `merge` flag to `test.session.Opts` - Mark `_new_argv()` as private. Test should use clear/new_session/spawn_wait instead.
* refactor(api)!: rename Dictionary => DictJustin M. Keyes2024-09-23
| | | | | | | | | | | | | | In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change.
* refactor(shada): rework msgpack decoding without msgpack-cbfredl2024-08-05
| | | | | | | This also makes shada reading slightly faster due to avoiding some copying and allocation. Use keysets to drive decoding of msgpack maps for shada entries.
* refactor(shada): remove ShaDaReadDef secondary wrapperbfredl2024-05-28
| | | | | | `FileDescriptor` is already a wrapper around an fd and a buffer. By allowing to just use the buffer without an fd, it can already handle in-memory reads.
* fix(shada): restore search pattern length properly (#28929)zeertzjq2024-05-23
|
* 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.
* test: remove unnecessary nil argument to testutil (#28270)zeertzjq2024-04-11
|
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* test: reduce sleep for file timestamp change (#28196)zeertzjq2024-04-06
| | | | Now that Nvim always supports nanotime, sleeping for some milliseconds is enough.
* test: correct order of arguments to eq() (#27816)zeertzjq2024-03-11
|
* test: move format_{string,luav} to a separate moduleLewis Russell2024-01-17
|
* test: refactor PathsLewis Russell2024-01-17
|
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: normalise nvim bridge functionsLewis Russell2024-01-12
| | | | | - remove helpers.cur*meths - remove helpers.nvim
* test: typing for helpers.methsLewis Russell2024-01-12
|
* test: use vim.mpack and vim.uv directlyLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* fix(shada): update marks when using delmarks! (#24978)Maria José Solano2023-09-03
|
* test(shada/marks_spec): load the file with the marks (#24979)zeertzjq2023-09-02
|
* fix(shada): update deleted marks (#24936)Maria José Solano2023-08-31
| | | | | | Fix #4295 Close #16067 Co-authored-by: chentau <tchen1998@gmail.com>
* test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value`Famiu Haque2023-05-22
| | | | `nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* refactor: remove modelines from Lua filesGregory Anders2023-04-13
| | | | Now that we have builtin EditorConfig support and a formatting check in CI, these are not necessary.
* test: replace lfs with luv and vim.fsdundargoc2023-04-04
| | | | | | test: replace lfs with luv luv already pretty much does everything lfs does, so this duplication of dependencies isn't needed.
* fix(rpc)!: preseve files when stdio channel is closed (#22137)zeertzjq2023-02-11
| | | | BREAKING CHANGE: Unsaved changes are now preserved rather than discarded when stdio channel is closed.
* fix(tests): fixes for using vim.mpack and more ASANbfredl2023-02-10
|
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* test: introduce skip() #21010dundargoc2022-11-13
| | | | | | | This is essentially a convenience wrapper around the `pending()` function, similar to `skip_fragile()` but more general-purpose. Also remove `pending_win32` function as it can be replaced by `skip(iswin())`.
* vim-patch:9.0.0537: the do_set() function is much too long (#20274)zeertzjq2022-09-22
| | | | | | | Problem: The do_set() function is much too long. Solution: Move setting of a string option to a separate function. https://github.com/vim/vim/commit/4740394f230dda09d6e9337465305741d8ee4fa3 Cherry-pick some tests from Vim patch 8.2.0540.
* build: rename build-related dirsJustin M. Keyes2022-06-28
| | | | | | | | | | | | | | Problem: Dirs "config", "packaging", and "third-party" are all closely related but this is not obvious from the layout. This adds friction for new contributors. Solution: - rename config/ to cmake.config/ - rename test/config/ to test/cmakeconfig/ because it is used in Lua tests: require('test.cmakeconfig.paths'). - rename packaging/ to cmake.packaging/ - rename third-party/ to cmake.deps/ (parallel with .deps/)
* fix(tests): check for EOF on exit of nvim properlybfredl2022-06-13
|
* refactor(tests): remove redir_exec #15718Justin M. Keyes2021-09-19
| | | | | | | | | | | Problem - `redir_exec` is obsolete, but it keeps getting used in new tests because people copy existing tests. - Disadvantages of `redir_exec`: - Captures extra junk before the actual error/message that we _want_ to test. - Does not fail on error, unlike e.g. `command()`. Solution - Use new functions like `nvim_exec` and `pcall_err`.
* feat(shada): restore Blob globals properlySean Dewar2021-09-15
| | | | | | | | | | | As Strings and Blobs are encoded as msgpack BINs, the current ShaDa implementation will restore global Blob variables as Strings (or msgpack special dicts if they contain NULs). Encode an additional element with Blob globals to differentiate them from Strings so that we can restore them with the correct type. Adjust variables_spec.lua's autotest() to also check for proper type.
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* shada: fix failed assertion on exit (#12692)erw72020-07-31
| | | | | | If set the number of history saves is 0, assertions fail when inserting an entry on exit. Dont insert an entry when the number of saves is 0 fixes the issue. fixes #11497
* vim-patch:8.2.0920: writing viminfo fails with a circular referenceerw72020-06-09
| | | | | | Problem: Writing viminfo fails with a circular reference. Solution: Use copyID to detect the cycle. (closes vim/vim#6217) https://github.com/vim/vim/commit/5b157fe2edfdce5f77080aeac2b4a03f39eb1c1a
* shada: fix write E5004 error on exiterw72020-06-08
| | | | | Fix the problem of failing to write shada when the global variable contains Funcref or Partial.
* shada: initialize jumplist before search pattern (#10964)Abdelhakeem Osama2019-09-07
| | | | | | | Since 8b8ecf4, the shada module loads files in the jumplist to properly clear duplicates. This can trigger some autocommands, which in turn saves and restores search and substitute patterns, freeing the previous strings in "spats" which are held in "wms" as well (heap-use-after-free). To avoid this, initialize the jumplist in "wms" before search patterns.
* test: Minimize shada/helpers.lua #10728Justin M. Keyes2019-08-09
|
* jumplist: avoid extra tail entry #9805Abdelhakeem Osama2019-04-02
| | | fixes #9775
* startup: always wait for UI with --embed, unless --headless also is suppliedBjörn Linse2018-09-22
|
* functests: Use proper path in `eq()`ZyX2018-04-02
|
* shada: Fix some memory leaks and completely ignore numbered mark namesZyX2018-04-01
| | | | | | | | | | | | | Problems: - In two places in shada_read_when_writing() memory just was not freed. Both places were verified to cause test failures. - Numbered marks got assigned incorrect (off-by-one compared to position in the array) numbers in replace_numbered_mark. - It was possible to have non-continuously populated array of numbered marks which messed up code for merging them. (Note about tests: marks with additional data are always compared different when merging, that caused some confusion regarding why test did not work the way I expected.)
* functests: Add test for merging with file with only numeric markZyX2018-04-01
| | | Known to cause memory leak, but not an expected crash.
* functests: Fix existing functional testsZyX2018-03-27
|
* tests: stderr output contains `cp` noiseJustin M. Keyes2018-01-05
| | | | closes #7811
* mark: Make sure that jumplist item will not have zero lnumZyX2017-12-24
| | | | Fixes #7169
* test/shada: fixup for Windows backslashes #7287Ignas Anikevicius2017-10-02
|
* shada: Make sure that code does not attempt to read too long itemsZyX2017-07-04
| | | Fixes #6957