need a test part for homebrew to merge it to homebrew-core
- Dominant language
- C
- Stars
- 7.6k
- Forks
- 1.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
add homebrew formula now
```
brew install cxwx/cxbrew/libhv
```
but it need the `test` part for merge to homebrew-core
like
```
test do
(testpath/"test.c").write <<~C
/* Wait for stdin to become readable, then read and echo the first line. */
#include
#include
#include
#include
ev_io stdin_watcher;
static void stdin_cb (EV_P_ ev_io *watcher, int revents) {
char *buf;
size_t nbytes = 255;
buf = (char *)malloc(nbytes + 1);
getline(&buf, &nbytes, stdin);
printf("%s", buf);
ev_io_stop(EV_A_ watcher);
ev_break(EV_A_ EVBREAK_ALL);
}
int main() {
ev_io_init(&stdin_watcher, stdin_cb, STDIN_FILENO, EV_READ);
ev_io_start(EV_DEFAULT, &stdin_watcher);
ev_run(EV_DEFAULT, 0);
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lev", "-o", "test"
input = "hello, world\n"
assert_equal input, pipe_output("./test", input, 0)
end
end
```

can somebody help?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.