aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/mksession_spec.lua
Commit message (Collapse)AuthorAge
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
* refactor(test): rename alter_slashes, invert its behaviorJustin M. Keyes2024-09-09
| | | | | | | - `alter_slashes` belongs in `testutil.lua`, not `testnvim.lua`. - `alter_slashes` is an unusual name. Rename it to `fix_slashes`. - invert its behavior, to emphasize that `/` slashes are the preferred, pervasive convention, not `\` slashes.
* 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.
* fix(process): start pty process eof timer on main thread (#27625)zeertzjq2024-02-26
|
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: typing for helpers.methsLewis Russell2024-01-12
|
* test: remove helpers.sleep()Lewis Russell2024-01-12
|
* test: do not inject vim module into global helpersLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* test: avoid repeated screen lines in expected stateszeertzjq2023-12-09
| | | | | | This is the command invoked repeatedly to make the changes: :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
* 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>
* 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.
* ci: bump to windows 2022dundargoc2023-03-11
| | | | Skip failing funcitonaltests. Use jobstart() instead termopen() for oldtests to prevent CI freezing.
* 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())`.
* fix(session): respect sessionoptions=terminal #19497Gustavo Sampaio2022-08-01
| | | | | fixes #13078 Co-authored-by: Yuta Katayama <8683947+yutkat@users.noreply.github.com>
* test(mksession_spec): use %bwipeout! instead of qall! to close terminal (#19465)zeertzjq2022-07-22
| | | Avoid expect_exit, session will be closed when a new one is spawned.
* fix(tests): check for EOF on exit of nvim properlybfredl2022-06-13
|
* fix(mksession): don't store floats in session #18635Daniel Steinberg2022-05-22
| | | | | | | | | | | | | | | | | | Problem: If there are floating windows when `:mksession` runs, the session cannot be properly restored. Solution: Change `:mksession` to skip floating windows. This matches Vim's treatment of popup windows. An alternative approach could have `:mksession` save floating windows that can be _properly_ restored (rather than skip them entirely, which is what this PR does). While that would seemingly be a more complete fix, that could present additional issues since floating windows are ordinarily created by plugins, and they may no longer be properly under a plugin's control when restored. closes #18432
* test(mksession_spec): only sleep on Windows (#18637)zeertzjq2022-05-19
|
* fix(termopen): avoid ambiguity in URI when CWD is root dir (#16988)zeertzjq2022-05-19
|
* test: fix mksession terminal CWD test again (#18615)zeertzjq2022-05-18
|
* test: unskip tests on Windows (#18600)zeertzjq2022-05-18
| | | | | | Remove the command('qall!') from mksession_spec.lua because it prevents helpers.rmdir() from retrying. Allow extra trailing spaces when matching terminal lines.
* test: use helpers.pending_win32(pending) instead of iswin()zeertzjq2022-02-26
|
* ci: skip tests that fail on windowsDundar Göc2022-02-20
|
* vim-patch:8.2.4090: after restoring a session buffer order can be quite ↵Evgeni Chasnovski2022-01-29
| | | | | | | | | | | | | | | | different (#17112) Problem: After restoring a session buffer order can be quite different. Solution: Create buffers first. (Evgeni Chasnovski, closes vim/vim#9520) https://github.com/vim/vim/commit/26ebf1f036517ebeacf571c333a83cca7e13bbe2 --------------- As in Vim, this basically reverts 8.1.0829 providing different solution (see vim/vim#9520). Regarding Neovim, this basically reverts changes from #15062. Test about restoring same terminals was a bit too restrictive with using actual buffer ids, which changed with this patch (now they should be in the same order as at `mksession` call), so I tweaked it.
* vim-patch:8.1.0829: when 'hidden' is set session creates extra buffersSean Dewar2021-07-17
| | | | | | | | | | | | | | Problem: When 'hidden' is set session creates extra buffers. Solution: Move :badd commands to the end. (Jason Franklin) https://github.com/vim/vim/commit/d39e275b57493f9e25e1b62f84810571eee30cf4 Adjust some tests in ex_cmds/mksession_spec.lua: - 'restores same :terminal buf in splits': Buffers aren't always :badded in the same order as they're :edited, :balted, etc, so the order of buffers in the buffer list may change slightly now that :badd happens afterwards. - 'restores buffers with tab-local CWD': This is explained in a comment.
* mksession: always unix slashes "/" for filepathsJustin M. Keyes2020-01-26
|
* mksession: simplify generated commandsJustin M. Keyes2020-01-26
| | | | | | | Doing ":file …" immediately after is enough to fixup the :terminal buffer name. ref #5250
* mksession: restore same :term buf in split windowsAlexandre Dubray2020-01-26
| | | | | | | | | | | | | | Problem: When session-restore creates a terminal buffer with command like `:edit term://.//16450:/bin/bash`, the buffer gets a different name (depends on PID). Thus the later call to `bufexists('term://.//16450:/bin/bash)` will return false. Solution: Force the buffer name with :file. This as least ensures the same buffer will show in multiple windows correctly, as expected when saving the session. But it still has problems: 1. the PID in the buffer name is bogus 2. redundant :terminal buffers still hang around fix #5250
* terminal: absolute CWD in term:// URI #11289Chris LaRose2020-01-26
| | | | | | | | | This makes it possible to restore the working directory of :terminal buffers when reading those buffers from a session file. Fixes #11288 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* :mksession : restore tab-local working directories #9754Chris LaRose2019-03-21
|
* test: robust cleanup, unique filenames #7950 (#7950)Justin M. Keyes2018-02-01
| | | | | | | Use unique filenames to avoid test conflicts. Use read_file() instead of io.popen(), to ensures the file is closed. Use helpers.rmdir(), it is far more robust than lfs. closes #7911
* mksession: Restore tab-local working directory #6859HiPhish2017-06-11
The ':tcd' command is the first tab-specific command written to the file and it is wrapped inside an 'if has('nvim')' block to keep the session file compatible with Vim. Closes #6678