Problem: When using ch_read() with zero timeout, can't tell the difference
between reading an empty line and nothing available.
Solution: Add ch_canread().
Problem: When the channel callback gets job info the job may already have
been deleted. (lifepillar)
Solution: Do not delete the job when the channel is still useful. (ichizok,
closes#1242, closes#1245)
Problem: An exiting job is detected with a large latency.
Solution: Check for pending job more often. (Ozaki Kiichi) Change the
double loop in mch_inchar() into one.
Problem: A channel is closed when reading on stderr or stdout fails, but
there may still be something to read on another part.
Solution: Turn ch_to_be_closed into a bitfield. (Ozaki Kiichi)
Problem: If a channel in NL mode is missing the NL at the end the remaining
characters are dropped.
Solution: When the channel is closed use the remaining text. (Ozaki Kiichi)
Problem: Can't tell which part of a channel has "buffered" status.
Solution: Add an optional argument to ch_status(). Let ch_info() also
return "buffered" for out_status and err_status.
Problem: The "Reading from channel output..." message can be unwanted.
Appending to a buffer leaves an empty first line behind.
Solution: Add the "out_msg" and "err_msg" options. Writing the first line
overwrites the first, empty line.
Problem: MS-Windows: some files remain after testing.
Solution: Close the channel output file. Wait for the file handle to be
closed before deleting the file.
Problem: When starting a job that reads from a buffer and reaching the end,
the job hangs.
Solution: Close the pipe or socket when all lines were read.
Problem: Using the system default encoding makes tests unpredictable.
Solution: Always use utf-8 or latin1 in the new style tests. Remove setting
encoding and scriptencoding where it is not needed.
Problem: filter() and map() either require a string or defining a function.
Solution: Support lambda, a short way to define a function that evaluates an
expression. (Yasuhiro Matsumoto, Ken Takata)
Problem: When using a job in raw mode to append to a buffer garbage
characters are added.
Solution: Do not replace the trailing NUL with a NL. (Ozaki Kiichi)
Problem: When a channel appends to a buffer that is 'nomodifiable' there is
an error but appending is done anyway.
Solution: Add the 'modifiable' option. Refuse to write to a 'nomodifiable'
when the value is 1.
Problem: Functions specifically for testing do not sort together.
Solution: Rename garbagecollect_for_testing() to test_garbagecollect_now().
Add test_null_list(), test_null_dict(), etc.
Problem: Cannot use ch_read() in the close callback.
Solution: Do not discard the channel if there is readahead. Do not discard
readahead if there is a close callback.
Problem: When a job ends the close callback is invoked before other
callbacks. On Windows the close callback is not called.
Solution: First invoke out/err callbacks before the close callback.
Make the close callback work on Windows.
Problem: Cannot detect a crash in tests when caused by garbagecollect().
Solution: Add garbagecollect_for_testing(). Do not free a job if is still
useful.
Problem: No test for an invalid Ex command on a channel.
Solution: Test handling an invalid command gracefully. Avoid getting an
error message, do write it to the channel log.