Make unit test for add_file able to tell "error" from "done" Importantly, we don't actually want to call evbuffer_write() when the buffer is empty. This makes it an error to ever get a -1 return value from evbuffer_add_file(), which makes it safe for us to test the return value.