Commit Graph

6 Commits

Author SHA1 Message Date
Thiago de Arruda
230c935e73 test: Fix problems in job_spec.lua
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).
2014-11-21 15:39:04 -03:00
Scott Prager
ea3296ad85 job_spec: Fix bad test. 2014-11-07 13:34:56 -03:00
Scott Prager
fd36dc208e job: Let vimL jobsend() accept a list.
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
2014-11-07 13:34:56 -03:00
Scott Prager
e90973e035 job: Make v:job_data[2] a list.
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.
2014-11-07 13:34:56 -03:00
Thiago de Arruda
d3f81424e5 job: Only force-close stdout/stderr when the job exits
stdout/stderr should only be closed after the job truly exits, or else we can
lose data sent by it.
2014-11-07 09:12:42 -03:00
Scott Prager
7203796c54 test/job: Implement some basic jobs tests. 2014-10-28 14:09:28 -03:00