/* Grab ourselves for comparison. */
len = read(fd, buf, sizeof(buf));
buf[len] = '\0';
/* Grab ourselves for comparison. */
len = read(fd, buf, sizeof(buf));
buf[len] = '\0';
/* We have exact-size buffer, which causes problems adding term. */
rbuf_init(&in, fd, malloc(len), len, test_realloc);
/* We have exact-size buffer, which causes problems adding term. */
rbuf_init(&in, fd, malloc(len), len, test_realloc);
rbuf_init(&in, fd, malloc(len), len, test_realloc);
p = rbuf_read_str(&in, 64);
ok1(p);
rbuf_init(&in, fd, malloc(len), len, test_realloc);
p = rbuf_read_str(&in, 64);
ok1(p);
rbuf_init(&in, fd, NULL, 0, test_realloc);
p = rbuf_read_str(&in, '^');
ok1(p);
ok1(rbuf_start(&in) == p + strlen(p) + 1);
free(rbuf_cleanup(&in));
rbuf_init(&in, fd, NULL, 0, test_realloc);
p = rbuf_read_str(&in, '^');
ok1(p);
ok1(rbuf_start(&in) == p + strlen(p) + 1);
free(rbuf_cleanup(&in));