aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/secure_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.
* 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(test): typingLewis Russell2024-03-25
|
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: typing for helpers.methsLewis 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: fix dependencies between test cases (#23343)zeertzjq2023-04-27
| | | Discovered using --shuffle argument of busted.
* test: make {MATCH:} behave less unexpectedly in screen:expect()zeertzjq2023-02-18
| | | | Include the rest of the line and allow multiple {MATCH:} patterns.
* fix(secure): crash when hitting escape in prompt (#21283)ii142022-12-05
| | | | | | | | - use pcall when calling vim.secure.read from C - catch keyboard interrupts in vim.secure.read, rethrow other errors - selecting "view" in prompt runs :view command - simplify lua stack cleanup with lua_gettop and lua_settop Co-authored-by: ii14 <ii14@users.noreply.github.com>
* refactor: rework parameter validation in vim.secure.trust() (#21223)Gregory Anders2022-11-28
|
* feat(secure): add `:trust` command and vim.secure.trust() (#21107)Jlll12022-11-28
| | | | | | | | | Introduce vim.secure.trust() to programmatically manage the trust database. Use this function in a new :trust ex command which can be used as a simple frontend. Resolves: https://github.com/neovim/neovim/issues/21092 Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: ii14 <ii14@users.noreply.github.com>
* 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")`.
* feat: add vim.secure.read()Gregory Anders2022-11-17
This function accepts a path to a file and prompts the user if the file is trusted. If the user confirms that the file is trusted, the contents of the file are returned. The user's decision is stored in a trust database at $XDG_STATE_HOME/nvim/trust. When this function is invoked with a path that is already marked as trusted in the trust database, the user is not prompted for a response.