| 8 | #include <stdlib.h> |
| 9 | |
| 10 | int main(void) |
| 11 | { |
| 12 | struct rbuf in; |
| 13 | |
| 14 | /* This is how many tests you plan to run */ |
| 15 | plan_tests(5); |
| 16 | |
| 17 | ok1(!rbuf_open(&in, "nonexistent-file", NULL, 0, NULL)); |
| 18 | ok1(errno == ENOENT); |
| 19 | ok1(rbuf_open(&in, "test/run-open.c", NULL, 0, NULL)); |
| 20 | ok1(close(in.fd) == 0); |
| 21 | /* If this fails to stat, it should fall back */ |
| 22 | ok1(rbuf_good_size(in.fd) == 4096); |
| 23 | |
| 24 | return exit_status(); |
| 25 | } |
nothing calls this directly
no test coverage detected