aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* Fix functional-test-105 failure in OSX.Eliseo Martínez2014-11-21
| | | | | | | | | See https://github.com/neovim/neovim/issues/1519 for failure report. Cause : In OSX, /tmp is a symbolic link to /private/tmp, which causes expected and got results different because of implicit resolution. Solution : Resolve path before setting expected value.
* test: Fix problems in job_spec.luaThiago de Arruda2014-11-21
| | | | | | | | | Nvim wasn't exiting cleanly in some job tests due to errors. This can't be noticed until the next commit, which will perform a refactoring to selectively process K_EVENT, so the `qa!` command executed at the end of each test blocks forever if there are errors which require the user to press ENTER(in that state Nvim no longer will process events).
* test: Refactor functional helpers to use vim_inputThiago de Arruda2014-11-21
| | | | | | | | | | | | | | | | | | | The vim_input function accepts raw terminal input and so is better to emulate real user, especially because it is not deferred as vim_feedkeys. Using this function required a number of changes: - expect() was refactored to use curbuf_contents() - The vim_eval function in request() was moved to curbuf_contents(). For most cases this is enough(we only care for synchronizing api calls with user input when verifying buffer contents). - <C-@>(NUL) is preprocessed before being passed to replace_termcodes. - Legacy test 4 had a bug that only became visible when using vim_input, it is fixed now. - An extra blank line deletion was required for test 101 The last two items show that vim_feedkeys because it is not 100% equivalent to receiving terminal input.
* runtime: Refer to plugins running outside Nvim as "remote plugins"Thiago de Arruda2014-11-21
| | | | | | - Rename autoload/rpc to autoload/remote - External plugins are now remote plugins - External plugins directory is "rplugin"
* legacy tests: migrate test105Rainer Borene2014-11-20
|
* legacy tests: migrate test26Rainer Borene2014-11-20
|
* legacy tests: migrate test101Rainer Borene2014-11-20
|
* legacy tests: migrate test75Rainer Borene2014-11-20
|
* legacy tests: migrate test51Rainer Borene2014-11-20
|
* legacy tests: migrate test43Rainer Borene2014-11-20
|
* legacy tests: migrate test33Rainer Borene2014-11-20
|
* legacy tests: migrate test67Rainer Borene2014-11-20
|
* legacy tests: migrate test66Rainer Borene2014-11-20
|
* legacy tests: migrate test25Rainer Borene2014-11-20
|
* legacy tests: migrate test104Rainer Borene2014-11-20
|
* legacy tests: implement :source helper method.Rainer Borene2014-11-20
|
* legacy tests: migrate test5Rainer Borene2014-11-20
|
* test: Add tests for the python providerThiago de Arruda2014-11-18
| | | | These tests were adapted from the python-client repository
* test: Add tests for the rpc#define#* functionsThiago de Arruda2014-11-18
|
* shell: Use job_write_cb for closing stdinThiago de Arruda2014-11-10
| | | | | | | | | | Commit @45525853d352 removed usage of the `job_write_cb` for closing stdin due to a memory error, but that doesn't work anymore because `job_close_in` closes stdin immediately, possibly trimming input data before it is fully written. Since most memory issues with jobs have been fixed, re-add the `job_write_cb` call to ensure stdin is only closed when it should. Also add tests for scenarios where using the callback makes a difference.
* eval: Return an empty list from systemlist() when there's no outputThiago de Arruda2014-11-10
| | | | This is the behavior on vim's `systemlist()`.
* test: Fix nondeterminism in tests with notificationsThiago de Arruda2014-11-10
| | | | | | | | Tests which spin the event loop and stop it in a notification handler have a chance of re-entering the event loop due to the `vim_eval` call in the `request()` helper(assuming the request call is what triggered the notification). Since this will cause an error to be thrown by the lua client, don't send the extra `vim_eval` request when the loop has been stopped.
* job_spec: Fix bad test.Scott Prager2014-11-07
|
* job: Let vimL jobsend() accept a list.Scott Prager2014-11-07
| | | | | | | | Use save_tv_as_string(), same as vimL system(). This also makes jobsend() more liberal in what it can accept. For example, `jobsend(j, 123)` is now valid. Closes #1176
* job: Make v:job_data[2] a list.Scott Prager2014-11-07
| | | | | | | | Factor out string_to_list() from f_system()'s implementation and use that to set job_data. This has the technical advantage of preserving NULs, and may be more convenient for users. Required for #1176.
* job: Only force-close stdout/stderr when the job exitsThiago de Arruda2014-11-07
| | | | | stdout/stderr should only be closed after the job truly exits, or else we can lose data sent by it.
* test: Pass --show-possibly-lost=no to valgrind in helpers.luaThiago de Arruda2014-11-07
| | | | | This command-line flag will suppress all warnings about interior pointers, which are used in hashtab.c.
* test: Improve test environment setup and error handling/reportingThiago de Arruda2014-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | During test setup, we used to call a vimscript function(BeforeEachTest) that attempted to restore Nvim to it's initial state as much as possible in order to provide a clean environment for running new tests. This approach has proven to be unreliable, as some tests leave state that can affect other tests, eventually causing failures that are difficult to debug. This commit changes the 'clear' function so it will restart Nvim every time it is called, which is a slower, but more reliable solution that will simplify spotting bugs in the future. Some other improvements/fixes were also performed: - Whenever an error is detected in a handler passed to "run()", the event loop will be stopped and the error will be propagated to the main thread. - Errors and the "cleanup()" function will always send a quit command to the current Nvim instance. This should prevent memory starvation when running tests under valgrind(where each Nvim instance can consume a lot of memory). - Fixed a wrong assertion in server_requests_spec.lua. Previously the failure was undetected in a notification handler. - Fixed some tests to expect fully clean registers. The deleted cleanup function used to put an empty string in every register, but that resulted in a extra line being added.
* channel: Delay notifications to avoid client race conditionsThiago de Arruda2014-11-06
| | | | | | | | | | It is currently possible for a client to send a response that doesn't match the current server->client request(at the top of the stack). This commit fixes that by delaying notifications to until the first `channel_send_call` invocation returns. Also remove the "call stack" size check, vim will already break if the call stack goes too deep.
* test: Simplify/fix options_spec.luaThiago de Arruda2014-11-06
| | | | | | | | | | The options_spec.lua suite has one purpose: Check if the :options commands will throw any exception(:options is implemented by $VIMRUNTIME/optwin.vim). For this it is best to use the `vim_command` API function since it will automatically catch exceptions and forward them via msgpack-rpc. Also, the option window seems to affect other tests, so call `restart` in the teardown hook.
* legacy tests: migrate test21Rainer Borene2014-11-04
|
* legacy tests: migrate test7Rainer Borene2014-11-04
|
* legacy tests: migrate test6Rainer Borene2014-11-04
|
* legacy tests: migrate test28Rainer Borene2014-11-04
|
* legacy tests: migrate test20Rainer Borene2014-11-04
|
* legacy tests: migrate test97Rainer Borene2014-11-04
|
* legacy tests: migrate test46Rainer Borene2014-11-04
|
* legacy tests: migrate test27Rainer Borene2014-11-04
|
* legacy tests: migrate test54Rainer Borene2014-11-04
|
* legacy tests: migrate test41Rainer Borene2014-11-04
|
* legacy tests: migrate test23Rainer Borene2014-11-04
|
* legacy tests: migrate test56Rainer Borene2014-11-04
|
* legacy tests: migrate test_autoformat_joinRainer Borene2014-11-04
|
* legacy tests: migrate test_changelistRainer Borene2014-11-04
|
* legacy tests: migrate test81Rainer Borene2014-11-04
|
* legacy tests: migrate test_utf8Rainer Borene2014-11-04
|
* legacy tests: migrate test_insertcountRainer Borene2014-11-04
|
* legacy tests: migrate test_optionsRainer Borene2014-11-04
|
* legacy tests: migrate test18Rainer Borene2014-11-04
|
* legacy tests: migrate test106Rainer Borene2014-11-04
|