aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
| * test: add test case for severity rangesGregory Anders2021-09-15
| |
| * refactor: move vim.lsp.diagnostic to vim.diagnosticGregory Anders2021-09-15
| | | | | | | | | | | | | | | | | | | | | | This generalizes diagnostic handling outside of just the scope of LSP. LSP clients are now a specific case of a diagnostic producer, but the diagnostic subsystem is decoupled from the LSP subsystem (or will be, eventually). More discussion at [1]. [1]: https://github.com/neovim/neovim/pull/15585
* | Merge pull request #15211 from seandewar/blob-portJan Edmund Lazo2021-09-16
|\ \ | | | | | | Port VimL's Blob type - vim-patch:8.1.{0735,0736,0738,0741,0742,0755,0756,0757,0765,0793,0797,0798,0802,1022,1023,1671},8.2.{0121,0184,0404,0521,0829,1473,1866,2712}
| * | feat(f_msgpackparse): support parsing from BlobSean Dewar2021-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Note that it is not possible for msgpack_unpack_next() and msgpack_unpacker_next() to return MSGPACK_UNPACK_EXTRA_BYTES, so it should be fine to abort() on that. Lua 5.1 doesn't support string hex escapes (\xXX) like VimL does (though LuaJIT does), so convert them to decimal escapes (\DDD) in tests.
| * | fix(test/dumplog): tostring(rv) before formatting as stringSean Dewar2021-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, implicitly converting a table to a string works in LuaJIT, but needs to be done explicitly with tostring() in Lua 5.1. This can cause issues when testing a non-JIT build if eq(), for example, fails with a table argument. E.g: eq({}, {1}) will not print the details of the assertion failure, but will instead print a less helpful "string expected, got table" error.
| * | feat(f_msgpackdump): support dumping to BlobSean Dewar2021-09-16
| | |
| * | feat(f_chansend): support Blob data argumentSean Dewar2021-09-16
| | |
| * | vim-patch:8.2.1473: items in a list given to :const can still be modifiedSean Dewar2021-09-16
| | | | | | | | | | | | | | | | | | | | | Problem: Items in a list given to :const can still be modified. Solution: Work like ":lockvar! name" but don't lock referenced items. Make locking a blob work. https://github.com/vim/vim/commit/021bda56710d98c09a6b35610a476ab2dd8c58ad
| * | vim-patch:8.2.0404: writefile() error does not give a hintSean Dewar2021-09-15
| | | | | | | | | | | | | | | | | | Problem: Writefile() error does not give a hint. Solution: Add remark about first argument. https://github.com/vim/vim/commit/18a2b87ca27c378a555b20f14a284d2ce3511427
| * | vim-patch:8.1.0793: incorrect error messages for functions that take a BlobSean Dewar2021-09-15
| | | | | | | | | | | | | | | | | | | | | Problem: Incorrect error messages for functions that now take a Blob argument. Solution: Adjust the error messages. (Dominique Pelle, closes vim/vim#3846) https://github.com/vim/vim/commit/0d17f0d1c09fa6db306336695ba646c21ea24909
| * | feat(decode_string): decode binary string with NULs to BlobSean Dewar2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | Strings that previously decoded into a msgpack special for representing BINs with NULs now convert to Blobs. It shouldn't be possible to decode into this special anymore after this change? Notably, Lua strings with NULs now convert to Blobs when passed to VimL.
| * | 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.
| * | feat(msgpack): convert Blobs to BIN stringsSean Dewar2021-09-15
| | |
| * | feat(json): convert Blobs to array of byte valuesSean Dewar2021-09-15
| | | | | | | | | | | | | | | Similiar to how Vim does it, but to be consistent with how Nvim encodes lists, add a space after every comma.
| * | feat(api): convert Blobs to API stringsSean Dewar2021-09-15
| | | | | | | | | | | | Note that these are not NUL-terminated; the API supports this.
| * | feat(nlua): convert Blobs to stringsSean Dewar2021-09-15
| | |
| * | vim-patch:8.1.0735: cannot handle binary dataSean Dewar2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot handle binary data. Solution: Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638) https://github.com/vim/vim/commit/6e5ea8d2a995b32bbc5972edc4f827b959f2702f Nvim-specific Blob conversions are implemented in future commits. Refactor write_blob() to use a FileDescriptor, as f_writefile() was refactored to use one (does not apply to read_blob()). Use var_check_lock() in f_add() for Blobs from v8.1.0897. Add a modeline to test_blob.vim and fix some doc typos. Include if_perl.txt's VIM::Blob() documentation. Interestingly, this function already worked before this port, as it just returns a Blob string literal, not an actual Blob object. N/A patches for version.c: vim-patch:8.1.0741: viminfo with Blob is not tested Problem: Viminfo with Blob is not tested. Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a special variable value. https://github.com/vim/vim/commit/8c8b8bb56c724cc1bfc3d8520eec33f2d399697c vim-patch:8.1.1022: may use NULL pointer when out of memory Problem: May use NULL pointer when out of memory. (Coverity) Solution: Check for blob_alloc() returning NULL. https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac
* | | fix(test runner): handle nil in no-colors output handler #15679Justin M. Keyes2021-09-16
|/ / | | | | | | | | | | | | | | | | | | | | Problem: 13748512f6d6 #15610 The no-colors codepath of the nvim.lua test output handler does not handle nil, leading to weird symptoms if e.g. a test has a syntax error: test/busted/outputHandlers/nvim.lua:105: attempt to concatenate a nil value Solution: Coerce to string in no-colors handler.
* / fix(:source): copy curbuf lines to memory before sourcing #15111Sean Dewar2021-09-15
|/ | | | | | | | | It's possible for weirdness to happen if curbuf is modified while sourcing from it via :source (with no arguments). For example: - Deleting lines from or wiping curbuf can cause internal error E315 to be thrown from ml_get. - Changing the curbuf to another buffer while sourcing can cause lines from the new curbuf to then be sourced instead.
* fix(:source, nvim_exec): handle Vimscript line continuations #14809Sean Dewar2021-09-14
| | | | | | | | | | | Problem: Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations. Solution: Factor out the concat logic into concat_continued_line() and a CONCAT_CONTINUED_LINES macro for simple concatenations where lines are fetched individually. Closes #14807
* docs: third-party licenses, TEST_COLORS, system() #15665Justin M. Keyes2021-09-14
|
* fix(lsp): correctly parse LSP snippets #15579hrsh7th2021-09-14
| | | Fixes #15522
* Merge pull request #15639 from bfredl/xdataBjörn Linse2021-09-12
|\ | | | | fix(tests): use isolated XDG_DATA_HOME in startup tests
| * fix(tests): use isolated XDG_DATA_HOME in startup testsBjörn Linse2021-09-12
| | | | | | | | | | | | | | | | | | Otherwise the users site packages will be loaded from ~/.local/share/nvim/site which can cause unexpected error messages and other kinds of mayhem Simpler alternative: use "--noplugin". Shouldn't be done because: (1) these tests should test the ordinary startup code path as close as possible (2) tests that test the loading of site packages will be added here very soon
* | Merge pull request #14770 from andrew-pa/fix13403Björn Linse2021-09-12
|\ \ | |/ |/| Fix relative float positioning
| * fix(windowing): positioning of relative floatsandrew-pa2021-09-08
| | | | | | | | | | | | Fix relative floating windows so that they open in the correct position relative to each other. Also make sure that their positions are correct immediately after creation without a redraw.
* | fix(build): add an env var to re-enable the colorsBjörn Linse2021-09-11
| |
* | Merge #14611 from seandewar/vim-8.1.1116Justin M. Keyes2021-09-11
|\ \ | | | | | | vim-patch:8.1.{1116,1188,1190,1355,1722,2035,2036,2038,2043},8.2.{0886,2309}
| * | vim-patch:8.2.0886: cannot use octal numbers in scriptversion 4Sean Dewar2021-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot use octal numbers in scriptversion 4. Solution: Add the "0o" notation. (Ken Takata, closes vim/vim#5304) https://github.com/vim/vim/commit/c17e66c5c0acd5038f1eb3d7b3049b64bb6ea30b :scriptversion is N/A. Cherry-pick latest str2nr() doc changes from v8.1.2035. Cherry-pick various mentions of the 0o prefix from: - v8.2.2324 - https://github.com/vim/vim/commit/2346a6378483c9871016f9fc821ec5cbea638f13 - https://github.com/vim/vim/commit/11e3c5ba820325b69cb56f70e13c21d7b8808d33 - https://github.com/vim/vim/commit/82be4849eed0b8fbee45bc8da99b685ec89af59a Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309. Make STR2NR_OOCT work the same as STR2NR_OCT when forcing. In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually force anything. Rather than abort(), make it work as STR2NR_OCT. This means STR2NR_FORCE | STR2NR_OCT works the same as STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
| * | vim-patch:8.1.2036: the str2nr() tests failSean Dewar2021-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The str2nr() tests fail. Solution: Add missing part of patch. https://github.com/vim/vim/commit/1ac90b4fa63414d56750559506a3e076df6923b0 Add extra tests for quoted numbers in vim_str2nr_spec.lua, as the included ones in this patch are somewhat lacking.
| * | vim-patch:8.1.1355: obvious mistakes are accepted as valid expressionsSean Dewar2021-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Obvious mistakes are accepted as valid expressions. Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto, closes vim/vim#3981) https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685 Update vim_str2nr_spec.lua to add more tests that use strict = true.
* | | feat(api): win_viewport also sends line_count #15613Yatao Li2021-09-10
|/ /
* | fix(mouse.c): fix mouse drag positions on multigrid #12667Ville Hakulinen2021-09-10
| | | | | | | | | | | | | | Currently, multigrid mouse drag positions are handled incorrectly if the drag event is not in the top left grid. Fix this by not adjusting the position of the event in jump_to_mouse. related: #15091
* | Merge pull request #15618 from jamessan/test-timeout-configJames McCoy2021-09-10
|\ \ | | | | | | test: use $TEST_TIMEOUT to specify timeout
| * | test: use $TEST_TIMEOUT to specify timeoutJames McCoy2021-09-09
| | |
* | | Merge pull request #15566 from bfredl/mpackBjörn Linse2021-09-09
|\ \ \ | | | | | | | | libs: vendor libmpack and libmpack-lua
| * | | feat(lua): make vim.mpack support vim.NIL and vim.empty_dict()Björn Linse2021-09-09
| | | |
* | | | test(busted): disable colors in test-runner output #15610Justin M. Keyes2021-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem ------- Because test/busted/outputHandlers/nvim.lua doesn't know if it's running in a terminal (no "isatty" equivalent), it outputs color codes in CI logs and local tooling that runs the tests in a pipe: [1m[ SKIPPED ]  This is just noise, hard for humans to read. Solution -------- Disable the color codes. If we later find a clever way to detect a terminal in nvim.lua, we might consider re-enabling colors, but that would still affect the CI build logs...
* | | | Merge pull request #15091 from yatli/mouse_drag_fixBjörn Linse2021-09-09
|\ \ \ \ | |/ / / |/| | | fix #15075 (mouse crash in multigrid)
| * | | fix(multigrid): #15075 mouse events crash neovimYatao Li2021-09-08
| | | |
* | | | docs: naming conventionsJustin M. Keyes2021-09-09
| | | |
* | | | feat(lua)!: register_keystroke_callback => on_keyJustin M. Keyes2021-09-09
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
* | | feat(lsp): support textDocument/prepareRename (#15514)Zi How Poh2021-09-08
|/ /
* | fix(screen): missing search highlights when redrawing from timer #15380Jit2021-09-06
| | | | | | | | | | | | | | * Revert "vim-patch:8.1.2294: cursor pos wrong with concealing and search causes a scroll" * Add a test which covers #13074 910bbc3cca796f7fa941e0f6176cd0061de0e01c while reverting the screen.c code changes from there. Fixes #14064
* | fix(lsp): update workspace/applyEdit handler signature (#15573)Jose Alvarez2021-09-05
| |
* | Merge pull request #15504 from mjlbach/feat/change-handler-signatureMichael Lingelbach2021-09-05
|\ \ | | | | | | feat(lsp)!: change handler signature
| * | feat(lsp)!: change handler signatureMichael Lingelbach2021-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the handler signature was: function(err, method, params, client_id, bufnr, config) In order to better support external plugins that wish to extend the protocol, there is other information which would be advantageous to forward to the client, such as the original params of the request that generated the callback. In order to do this, we would need to break symmetry of the handlers, to add an additional "params" as the 7th argument. Instead, this PR changes the signature of the handlers to: function(err, result, ctx, config) where ctx (the context) includes params, client_id, and bufnr. This also leaves flexibility for future use-cases. BREAKING_CHANGE: changes the signature of the built-in client handlers, requiring updating handler calls
* | | refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
| | |
* | | feat(api): nvim_get_chan_info: include "argv" for jobs #15537Justin M. Keyes2021-09-01
| | | | | | | | | ref #15440
* | | fix(jobwait): always drain process event queues #15402Gregory Anders2021-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: jobwait() returns early if the job was stopped, but the job might have pending callbacks on its event queue which are required to complete its teardown. State such as term->closed might not be updated yet (by the pending callbacks), so codepaths such as :bdelete think the job is still running. Solution: Always flush the job's event queue before returning from jobwait(). ref #15349