aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/msgpack_spec.lua
Commit message (Collapse)AuthorAge
* fix(msgpack): strptime() fails east of UTC+12 #41743Volodymyr Chernetskyi2026-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: msgpack#strptime() finds a timestamp by bisecting strftime() output, and brackets the search with the extreme UTC offsets. The lower bound subtracts 12 hours, but -12:00 is the westernmost offset, which produces the *largest* timestamp for a given local time. The easternmost offset is +14:00, so in any zone east of UTC+12 the search can start above the target and the function throws: internal-start-string:Internal error: start > string With TZ=GMT-14, four of the five timestamps in msgpack_spec.lua fail, as do three tests in shada_spec.lua, which reaches the same function through shada#strings_to_sd(). Solution: Subtract 14 hours instead. The upper bound is already generous enough at +14, and widening a bisection bracket downwards cannot change the result in zones that worked before. The test disables the python3 provider, because msgpack#strptime() only uses the Vimscript implementation changed here when no provider answers, and otherwise hands the work to datetime.strptime(). AI-assisted
* 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`.
* refactor(test): drop deprecated exc_exec #39242Justin M. Keyes2026-04-20
|
* test: reduce some clear() callszeertzjq2025-09-22
| | | | | | | | | 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.
* refactor(typval)!: remove distinction of binary and nonbinary stringsbfredl2024-06-27
| | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* 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: Eliminate plugin/helpers.luaJustin M. Keyes2019-08-05
|
* functests: Add testsZyX2018-09-06
|
* Merge #7623 'man.vim: highlight bold, underlined text'Justin M. Keyes2018-01-09
|
* plugin/msgpack: Support character constants like '\0'ZyX2017-01-04
|
* 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.
* Satisfy testlint.KillTheMule2016-04-28
| | | | For that, make luatest ignore the preload.lua files.
* functests: Make json_functions_spec use new NIL where appropriateZyX2016-04-18
|
* runtime/msgpack: Add support for special valuesZyX2016-04-18
|
* Normalize nan/-nan in plugin/msgpack_spec.luaThiago de Arruda2016-03-07
| | | | | | | -NaN doesn't exist in the IEEE 754 spec, it is a hardware-specific detail abstracted away by luajit(and not by lua or nvim), so there's no need to test it. Normalize all tests that involve -nan so the suite will be compatible with both Lua and Luajit.
* functests: Do not run some tests if there is no -NaNZyX2015-11-01
|
* runtime: Add autoload/msgpack.vim helper fileZyX2015-11-01