Lines Matching defs:in
36 struct istream *in;
49 test_istream_set_allow_eof(ctx->in, TRUE);
51 test_istream_set_size(ctx->in, ctx->pos/4);
52 i_stream_set_input_pending(ctx->in, TRUE);
58 input size so there's something in internal buffer. */
69 const char *run_pump(struct istream *in, struct ostream *out, int *counter, buffer_t *out_buffer)
74 struct nonblock_ctx ctx = { in, out, 0, 0 };
77 if (!in->blocking) {
78 test_assert(i_stream_get_size(in, TRUE, &ctx.max_size) > 0);
79 test_istream_set_size(in, 0);
80 test_istream_set_allow_eof(in, FALSE);
85 pump = iostream_pump_create(in, out);
86 i_stream_unref(&in);
103 if (!ctx.in->blocking && ctx.in->stream_errno != 0 &&
141 struct istream *in;
145 test_iostream_setup(block, &in, &out, &buffer);
148 test_assert(strcmp(run_pump(in, out, &counter, buffer), "hello, world") == 0);
164 struct istream *in = i_stream_create_failure_at(in_2, 0, EIO, "test pump fail");
167 test_assert(strcmp(run_pump(in, out, &counter, buffer), "") == 0);
183 struct istream *in = i_stream_create_failure_at(in_2, 4, EIO, "test pump fail");
186 test_assert(strcmp(run_pump(in, out, &counter, buffer), "hell") == 0);
202 struct istream *in = i_stream_create_failure_at_eof(in_2, EIO, "test pump fail");
205 test_assert(strcmp(run_pump(in, out, &counter, buffer), "hello, world") == 0);
216 struct istream *in;
220 test_iostream_setup(block, &in, &out_2, &buffer);
224 test_assert(strcmp(run_pump(in, out, &counter, buffer), "") == 0);
235 struct istream *in;
239 test_iostream_setup(block, &in, &out_2, &buffer);
244 /* "hel" because the last byte is only in internal buffer */
245 test_assert(strcmp(run_pump(in, out, &counter, buffer), block ? "" : "hel") == 0);
260 struct istream *in;
264 test_iostream_setup(block, &in, &out_2, &buffer);
268 test_assert(strcmp(run_pump(in, out, &counter, buffer), "hello, world") == 0);