aboutsummaryrefslogtreecommitdiff
path: root/test/unit
Commit message (Collapse)AuthorAge
* win: avoid duplicate separators in $PATH #12869Justin M. Keyes2020-09-08
| | | | | | | | | | | | | | | Seems like redundant env var separators (";" on Windows) in $PATH can cause weird behavior. From #7377: > After some time, system(['win32yank', '-o']) and system('win32yank -o') > start returning different results: specifically first returns an > empty string. > > 1. $PATH weirdly contains double semicolon followed by path to the > “installation directory” (unpacked directory from archive). > 2. If I run `let $PATH=substitute($PATH, ';;', ';', 'g')` the problem is fixed. close #7377 ref 224f99b85d311ebd31451db13b66e4a3c7e51938
* lua: Use #var instead of deprecated table.getn(var)James McCoy2020-07-31
|
* vim-patch:8.2.0539: comparing two NULL list failsJan Edmund Lazo2020-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Comparing two NULL list fails. Solution: Change the order of comparing two lists. https://github.com/vim/vim/commit/7b293c730b07d1586688e622b8d9cbbb4a52379b N/A patches for version.c: vim-patch:8.2.1187: terminal2 test sometimes hangs in the GUI on Travis Problem: Terminal2 test sometimes hangs in the GUI on Travis. Solution: Disable Test_zz2_terminal_guioptions_bang() for now. https://github.com/vim/vim/commit/c85156bb897085d7f5a8e4e180287f87bf19b948 vim-patch:8.2.1188: memory leak with invalid json input Problem: Memory leak with invalid json input. Solution: Free all keys at the end. (Dominique Pellé, closes vim/vim#6443, closes vim/vim#6442) https://github.com/vim/vim/commit/6d3a7213f58da834b0fc869d05f87e86010c66cf vim-patch:8.2.1196: build failure with normal features Problem: Build failure with normal features. Solution: Add #ifdef. https://github.com/vim/vim/commit/83e7450053399942e1c9efa802c568b51d948541 vim-patch:8.2.1198: terminal2 test sometimes hangs in the GUI on Travis Problem: Terminal2 test sometimes hangs in the GUI on Travis. Solution: Move test function to terminal3 to see if the problem moves too. https://github.com/vim/vim/commit/a4b442614c5ca4ebf32acf5cf0b7b718496f1c94
* vim-patch:8.0.1554: custom plugins loaded with --cleanJan Edmund Lazo2020-06-18
| | | | | | Problem: Custom plugins loaded with --clean. Solution: Do not include the home directory in 'runtimepath'. https://github.com/vim/vim/commit/072687032683b1994d25a114893d9a6f8bc36612
* vim-patch:8.2.0111: VAR_SPECIAL is also used for booleansBilly Su2020-06-06
| | | | | | Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking. https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
* gen_api_dispatch.lua: allow msgpack int for Float args; test: add ↵Yatao Li2020-04-28
| | | | ui_pum_set_bounds and tv_dict_add_float tests
* lua: move test helper function, map and filter, to vim.shared moduleHirokazu Hata2020-02-18
|
* Add new marktree data structure for storing marksBjörn Linse2020-01-14
| | | | | | This is inspired by Atom's "marker index" data structure to efficiently adjust marks to text insertions deletions, but uses a wide B-tree (derived from kbtree) to keep the nesting level down.
* vim-patch:8.1.1579: dict and list could be GC'ed while displaying errorJan Edmund Lazo2020-01-05
| | | | | | | | | Problem: Dict and list could be GC'ed while displaying error in a timer. (Yasuhiro Matsumoto) Solution: Block garbage collection when executing a timer. Add test_garbagecollect_soon(). Add "no_wait_return" to test_override(). (closes vim/vim#4571) https://github.com/vim/vim/commit/adc6714aac20f5462a0ecec50ab4806b2f3ab0db
* doc: fix typosBrian Wignall2019-11-27
| | | | close #11459
* build/doc/CI: remove/update quickbuild references #11258Justin M. Keyes2019-10-19
|
* vim-patch:8.1.1371: cannot recover from a swap file #11081Jurica Bradarić2019-10-05
| | | | | | | Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes vim/vim#4369) https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
* tui: fix handling of bg response after suspend (#11145)Daniel Hahler2019-10-03
| | | | | | | | | | | | | | | | `tui_terminal_after_startup` gets called right after resuming from suspending (via `Ctrl-z`) already (not delayed as with the startup itself), and would set `waiting_for_bg_response` to false then directly. This results in the terminal response not being processed then anymore, and leaking into Neovim itself. This changes it to try 5 times always, which means that it typically would stop after a few characters of input from the user typically, e.g. with tmux, which does not send a reply. While it might be better to have something based on the time (e.g. only wait for max 1s), this appears to be easier to do. Fixes regression in 8a4ae3d.
* tests: unit: NVIM_TEST_TRACE_LEVEL: default to 0 #11144Daniel Hahler2019-10-02
| | | | Traces are not useful normally (unless debugging/fixing tests), but only add overhead. Disable them by default.
* tui: improve handle_background_color: short-circuit (#11067)Daniel Hahler2019-09-30
| | | | | | | | * handle_background_color: short-circuit if handled already * Unit tests for handle_background_color * set waiting_for_bg_response to false in tui_terminal_after_startup By then it should have been received.
* tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)Daniel Hahler2019-09-22
|
* tests: improve error message with literat "~" directory (#11032)Daniel Hahler2019-09-17
|
* tests: assert:set_parameter('TableFormatLevel', 100) #10925Daniel Hahler2019-09-03
| | | | | | 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.
* tests: unit.helpers: provide string with write errors (#10715)Daniel Hahler2019-08-06
| | | | This might help to have more information in case of errors, like mentioned in https://github.com/neovim/neovim/commit/eec529cf9e.
* test/mbyte_spec: skip broken test on QuickBuildJustin M. Keyes2019-08-06
| | | | Forgot `return` in eec529cf9e13.
* test/mbyte_spec: skip broken test on QuickBuildJustin M. Keyes2019-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 14:13:04,119 INFO - # ./test/unit/helpers.lua @ 760: mbyte utf_char2bytes for chars 0xa000 - 0xafff 14:13:06,307 WARN - E908: using an invalid value as a String /usr/home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/.deps/usr/bin/luajit: ./test/unit/helpers.lua:459: write() error: 32: Broken pipe 14:13:06,308 WARN - stack traceback: 14:13:06,308 WARN - [C]: in function 'throw' 14:13:06,308 WARN - ...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:149: in function 'error' 14:13:06,308 WARN - ...ts-automated/.deps/usr/share/lua/5.1/luassert/assert.lua:171: in function 'assert' 14:13:06,308 WARN - ./test/unit/helpers.lua:459: in function 'write' 14:13:06,308 WARN - ./test/unit/helpers.lua:626: in function 'hook' 14:13:06,308 WARN - ./test/unit/helpers.lua:574: in function <./test/unit/helpers.lua:557> 14:13:06,308 WARN - [C]: in function 'type' 14:13:06,308 WARN - ...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:57: in function 'copyElement' 14:13:06,308 WARN - ...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:66: in function 'format' 14:13:06,308 WARN - ...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:172: in function 'fn' 14:13:06,308 WARN - ...-requests-automated/.deps/usr/share/lua/5.1/mediator.lua:103: in function 'publish' 14:13:06,308 WARN - ...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:201: in function 'safe' 14:13:06,308 WARN - ...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:312: in function 'execute' 14:13:06,308 WARN - ...sts-automated/.deps/usr/share/lua/5.1/busted/execute.lua:58: in function 'execute' 14:13:06,308 WARN - ...ests-automated/.deps/usr/share/lua/5.1/busted/runner.lua:197: in function <...ests-automated/.deps/usr/share/lua/5.1/busted/runner.lua:11> 14:13:06,308 WARN - ./.deps/usr/lib/luarocks/rocks/busted/2.0.0-1/bin/busted:3: in main chunk 14:13:06,308 WARN - [C]: at 0x004041a0 14:13:06,323 WARN - Terminated 14:13:06,325 INFO - Executing post-execute action... 14:13:06,526 INFO - Checking step execute condition... 14:13:06,526 INFO - Step execute condition satisfied, executing... 14:13:06,706 INFO - Executing pre-execute action... 14:13:06,706 INFO - Running step...
* build/tests: remove pre/uv.h #10531Daniel Hahler2019-07-28
| | | | | | Initially done in 28e59cb22, but does not appear to be necessary anymore. Uses UV_EEXIST directly, just like UV_ENOENT.
* test: cleanup, reduce verbosityJustin M. Keyes2019-06-01
|
* Merge #9709 'fileio: use os_copy to create backups'Justin M. Keyes2019-05-20
|\ | | | | | | ref #8288
| * test: move trim to global helpersSaid Al Attrach2019-03-30
| |
* | test: remove use of require('test.helpers')Justin M. Keyes2019-05-18
| | | | | | | | | | | | The test.functional.helpers and test.unit.helpers modules now include all of the public functions from test.helpers, so there is no need to separately require('test.helpers').
* | lua/stdlib: Introduce vim.sharedJustin M. Keyes2019-05-18
| | | | | | | | | | | | | | | | | | | | This is where "pure functions" can live, which can be shared by Nvim and test logic which may not have a running Nvim instance available. If in the future we use Nvim itself as the Lua engine for tests, then these functions could be moved directly onto the `vim` Lua module. closes #6580
* | test: Extend {unit,functional}.helpers with global helpersJustin M. Keyes2019-05-18
|/ | | | | | | | Automatically include all "global helper" util functions in the unit.helpers and functional.helpers and modules. So tests don't need to expicitly do: local global_helpers = require('test.helpers')
* search.c: remove dead code #5307Justin M. Keyes2019-03-02
| | | has_mbyte is always true.
* os/env: use libuv v1.12 getenv/setenv APIJustin M. Keyes2019-02-27
| | | | | | | | | | | - Minimum required libuv is now v1.12 - Because `uv_os_getenv` requires allocating, we must manage a map (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` . - free() map-items after removal. khash.h does not make copies of anything, so even its keys must be memory-managed by the caller. closes #8398 closes #9267
* test: Lua 5.2/5.3 compatMatěj Cepl2019-01-17
| | | | | close #9515 ref #9280
* Merge pull request #9240 from jamessan/mbyte_spec-failureJames McCoy2018-11-15
|\ | | | | unit/mbyte_spec: Run utf_char2bytes test in batches of 0xFFF characters
| * unit/mbyte_spec: Run utf_char2bytes test in batches of 0xFFF charactersJames McCoy2018-11-15
| | | | | | | | | | Running the full 0xFFFF set of tests in one process fails on slower architectures/when there's CPU contention.
* | shell/logging: Fix E730 with verbose system({List}) #9009Justin M. Keyes2018-09-21
|/ | | | | | | | ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790 Steps to reproduce: :set verbose=9 :call system(['echo']) E730: using List as a String
* test: Rename includes/pre/uv-errno.h to includes/pre/uv.hJames McCoy2018-07-11
| | | | | | | | | | | | | | | | | | libuv users are only supposed to directly include uv.h. In v1.21.0, all the uv-*.h headers were renamed to uv/*.h, which caused the unit tests to fail with [123/125] Generating post/uv-errno.h FAILED: test/includes/post/uv-errno.h cd «SRCDIR»/src/neovim/build/test/includes && /usr/bin/clang -std=c99 -E -P «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h -I/usr/include -I/usr/include -o «SRCDIR»/neovim/build/test/includes/post/uv-errno.h «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h:1:10: error: 'uv-errno.h' file not found with <angled> include; use "quotes" instead #include <uv-errno.h> ^~~~~~~~~~~~ "uv-errno.h" The intention of the file is to extend libuv's error constants with more values used by the unit tests. This can just as easily be achieved without poking into pseudo-private header files.
* test: build_stl_str_hl (#8703)ZviRackover2018-07-10
| | | | Improve coverage of `build_stl_str_hl`. Minor removal of dead code in the tested function.
* test: port kword_test to Lua for utf_char2bytes()Jan Edmund Lazo2018-07-01
| | | | | | Use LuaJIT FFI to create char pointer. Validate output with utf_ptr2char(), vim_iswordc() and vim_iswordp(). Use const for LuaJIT string-to-char conversion.
* lintJustin M. Keyes2018-04-28
|
* test/unit/undo_spec.lua: fixup after rebase #4985Justin M. Keyes2018-04-27
|
* test/unit: some unit tests for undo.c #4985Christopher Waldon2018-04-27
|
* Merge branch 'master' into s-dash-stdinb-r-o-c-k2018-04-14
|\
| * refactor/rename: path_try_shorten_fname()Justin M. Keyes2018-03-24
| |
| * refactor/rename: path_is_absolute()Justin M. Keyes2018-03-24
| |
| * unittest: Ignore all _Float-prefixed types (#8067)James McCoy2018-02-25
| | | | | | | | Previously, we ignored only _Float128. But glibc 2.27 added _Float32 and _Float32x. Rather than play whack-a-mole, ignore everything.
| * tests: Make format_string('%q', ...) output more stableZyX2018-02-02
| | | | | | It appears to be different on lua and luajit.
| * os/input.c: parse keycodes in non-string context #7411lePerdu2018-01-18
| | | | | | | | | | | | | | | | | | | | | | cb02137dfac7 had two mistakes, of the same nature: trans_special() must be invoked with in_string=false unless the parsing context is a VimL string. replace_termcodes() and input_enqueue() are low-level mechanisms where VimL strings do not exist. keymap.c: adjust double-quote case to satisfy keymap_spec.lua closes #7410
| * *: Provide list length when allocating listsZyX2018-01-14
| |
| * *: Fix linter errorsZyX2017-12-24
| |
| * eval: Replace some tv_list_item_remove() callsZyX2017-12-24
| | | | | | | | | | There is nothing wrong with them, just it is generally better to remove a range then to remove items individually.
| * unittests: Do gc after reporting error, not beforeZyX2017-12-24
| | | | | | | | | | Reason: test may contain cleanup at the endwhich is needed for GC to work properly, but is not done if test fails. With collectgarbage() in former position it would crash when collecting garbage.