MCPcopy Create free account
hub / github.com/ElementsProject/lightning / main

Function main

ccan/ccan/rbuf/test/run-open.c:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <stdlib.h>
9
10int 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}

Callers

nothing calls this directly

Calls 2

rbuf_openFunction · 0.85
rbuf_good_sizeFunction · 0.85

Tested by

no test coverage detected