aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shell/viml_system_spec.lua
Commit message (Collapse)AuthorAge
* test: Only display cursor marker in screen tests if nvim is not busyThiago de Arruda2015-03-16
|
* tests/ui: Also test character at cursorBjörn Linse2015-03-09
|
* test: Add extra screen expectation to prevent race conditionThiago de Arruda2015-02-20
| | | | | This is to ensure ctrl+c is only pressed after the command has started executing in the viml_system_spec.lua system() interrupt test.
* test: Remove unnecessary tests from viml_system_spec.luaThiago de Arruda2015-02-16
| | | | | | The `system` function is never executed with these tests because the ctrl+c is queued with the input string that calls it(The `process_interrupts` function will destroy all previous input when a ctrl+c is found).
* api: always return empty string as api type StringBjörn Linse2015-02-16
|
* test: Remove nondeterminism in systemlist interrupt testsThiago de Arruda2015-02-06
| | | | | | | | | | The systemlist test currently calls the `echo` command which can potentially complete before being interrupted, causing random test failures. Use `yes | xargs` instead. A `yes` invocation that is not piped through `xargs` can produce a huge amount of lines in a very short time, leading memory starvation when the result is being converted into a list. `xargs` ensures only one line of output will be produced while allowing interrupt to be tested.
* Tests for system()/systemlist() when interrupted with CTRL-C.oni-link2015-01-17
|
* systemlist: test empty lines in beginning and middle of outputBjörn Linse2014-12-02
|
* systemlist: add `keepempty` option to preserve final newlineBjörn Linse2014-12-02
|
* Avoid printing an error response when detecting xclip.John Szakmeister2014-11-26
| | | | | | | While we're at, using the slightly more portable `command -v` technique to detect the executable. Also, there's no need to use `io.popen()` if we aren't going to record the path. Instead, let's use the simpler `os.execute()` to detect the presence of xclip.
* 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.
* 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/shell: Add failure tests for `system()`.Scott Prager2014-10-28
|
* job: Refactor to ensure that all callbacks will be invokedThiago de Arruda2014-10-23
| | | | | | | | | | | | | | It's possible that a child process won't close it's standard streams, even after it exits. This can be evidenced with the "xclip" program: :call system('xclip -i -selection clipboard', 'DATA') Before this commit, the above command wouldn't return, even though the xclip program had exited. That is because `xclip` wasn't closing it's stdout/stderr streams, which would block pending_refs from ever reaching 0. Now the job.c module was refactored to ensure all streams are closed when the uv_process_t handle is closed.
* test: verify that v:shell_error is set by `system()`/`systemlist()`Thiago de Arruda2014-10-22
|
* test: Add some specs for the viml function `system()`Thiago de Arruda2014-10-01
These new specs replace src/nvim/testdir/test_system