summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/plugin/shada_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-20refactor(test): drop deprecated exc_exec #39242Justin M. Keyes1
2025-10-11test(plugin/shada_spec): always use UTC formatted date (#36128)Vlad1
Problem Similar to https://github.com/neovim/neovim/pull/33257, but for the date component. When timezone is behind UTC the epoch date of individual components mismatch causing the test to fail. Solution The `epoch` variable is created using `os.date` with a `!`, which means format the date in UTC instead of local timezone: https://www.lua.org/manual/5.1/manual.html#pdf-os.date. Since the individual components like year, month, and day are expected to match `epoch` they should all be created using a `!` as well.
2025-09-22test: reduce some clear() callszeertzjq1
Use only a single clear() call in some test/functional/vimscript/ test files whose test cases have very little side effect. A downside of using a single clear() is that if a crash happens in one test case, all following test cases in the same file will also fail, but these functionalities and tests don't change very often.
2025-07-23refactor(shada): switch plugin/shada.vim to Lua #34725Yochem van Rosmalen1
2025-05-22fix: use nvim namespace convention #34010Yochem van Rosmalen1
2025-04-04test(plugin/shada_spec): failure if timezone isn't a whole hour ahead of UTC ↵tstsrt1
(#33257) Problem: When running functional tests locally, test `syntax/shada.vim works` fails if the local timezone is not a whole number of hours ahead of UTC. Solution: Use '!%M' for minute format so that UTC is used in the expected timestamp instead of the local timezone, just like '%H' for hours.
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
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.
2024-06-27refactor(typval)!: remove distinction of binary and nonbinary stringsbfredl1
This is a breaking change which will make refactor of typval and shada code a lot easier. In particular, code that would use or check for v:msgpack_types.binary in the wild would be broken. This appears to be rarely used in existing plugins. Also some cases where v:msgpack_type.string would be used to represent a binary string of "string" type, we use a BLOB instead, which is vimscripts native type for binary blobs, and already was used for BIN formats when necessary. msgpackdump(msgpackparse(data)) no longer preserves the distinction of BIN and STR strings. This is very common behavior for language-specific msgpack bindings. Nvim uses msgpack as a tool to serialize its data. Nvim is not a tool to bit-perfectly manipulate arbitrary msgpack data out in the wild. The changed tests should indicate how behavior changes in various edge cases.
2024-04-23test: improve test conventionsdundargoc1
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.
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-01-12test: rename (meths, funcs) -> (api, fn)Lewis Russell1
2024-01-12test: normalise nvim bridge functionsLewis Russell1
- remove helpers.cur*meths - remove helpers.nvim
2024-01-12test: typing for helpers.methsLewis Russell1
2024-01-12test: use vim.mpack and vim.uv directlyLewis Russell1
2024-01-03refactor: format test/*Justin M. Keyes1
2023-05-22test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value`Famiu Haque1
`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.
2023-05-21refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell1
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
2023-04-27test: fix dependencies between test cases (#23343)zeertzjq1
Discovered using --shuffle argument of busted.
2022-11-22test: simplify platform detection (#21020)dundargoc1
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")`.
2022-10-05test(shada): fix shada syntax definitions testbfredl1
These tests contained errors due to synstack() and friends do not ensure syntax state is fully synced. Actually expecting what the user will see with a screen test does ensure it is fully synced.
2022-02-27feat(lua): add api and lua autocmdsTJ DeVries1
2021-08-18test: update tests to work with 'hidden'Gregory Anders1
2019-09-05test/shada_spec: avoid exit_event race #10951Justin M. Keyes1
Doing clear() multiple times in quick succession provokes the `exit_event` race described in #8813. - Avoid it by removing unnecessary reset() call. - Replace unnecessary nested describe() blocks with it() blocks. ref d4a0b6c4e1d7
2019-09-03tests: assert:set_parameter('TableFormatLevel', 100) #10925Daniel Hahler1
luassert uses 3 by default, which is often not enough. Instead of documenting how to increase it, let's use a more fitting (sane) default of 100 levels.
2019-08-07Fix lualint: remove unused varDaniel Hahler1
2019-08-07tests: more cleanup of plugin/shada_specDaniel Hahler1
Ref: https://github.com/neovim/neovim/pull/10701/commits/330a6713#r311005754 Closes https://github.com/neovim/neovim/pull/10710.
2019-08-05test: Eliminate plugin/helpers.luaJustin M. Keyes1
2018-10-31functionaltest: win: enable shada FileWriteCmdJan Edmund Lazo1
2018-02-01test: robust cleanup, unique filenames #7950 (#7950)Justin M. Keyes1
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
2018-01-09Merge #7623 'man.vim: highlight bold, underlined text'Justin M. Keyes1
2018-01-06win: enable more functional testsJan Edmund Lazo1
- plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set fileformat=unix'.
2017-07-14test: shada: Replace hard-coded 704 with dynamic versionJames McCoy1
2017-05-31test: Fix and add cases for unnamed registerAdnoC1
Also: Add ru to shada tests with all keys Add test for unset unnamed and register 0
2017-05-31eval/shada: Add testing for unnamed register with setreg and startupAdnoC1
2017-01-04plugin/shada: Handle NUL characters with intchar correctlyZyX1
Fixes #5482
2016-08-31api: consistently use nvim_ prefix and update documentationBjörn Linse1
2016-08-26Mark some functional tests as pending in WindowsRui Abreu Ferreira1
2016-06-10functests: Check logs in lua codeZyX1
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.
2016-04-13Update lua client to 0.0.1-24Thiago de Arruda1
The new version of the lua client uses libmpack as a backend, and some test scripts had to be updated to reflect that.
2016-04-01tests: update tests to use [gs]et_lines instead of [gs]et_line_sliceBjörn Linse1
2015-12-01Test: remove artifacts from root directoryMarco Hinz1
The tests would leave the following test files in the root directory: Xtest-functional-plugin-shada.shada Xtest-functional-plugin-shada.shada.tmp.f Clean them up in teardown().
2015-11-23Merge pull request #3581 from ZyX-I/fix-shadaFelipe Morales1
Store last search direction when writing ShaDa files
2015-11-23shada: Also store last search directionZyX1
Note: it looks like viminfo files do not store search direction intentionally. After reading viminfo file search direction was considered to be “forward”. Note 2: all files created on earlier Neovim version will automatically receive “forward” direction. Fixes #3580
2015-11-23test/functional: clean up according to luacheck (part 2)Marco Hinz1
2015-11-01runtime: Add shada.vim syntax fileZyX1
2015-11-01runtime: Add [ft]plugin/shada.vim files that automatically open .shadaZyX1
2015-11-01runtime: Add autoload/shada.vim helper fileZyX1
Contains most of the logic