zorgnax/libtap ? reverse-engineered prompt
Reverse engineered prompt
Build me a small C testing helper library that makes it easy to write TAP style tests for C programs.
I want to be able to include a header and use simple macros like plan, ok, is, isnt, cmp_ok, cmp_mem, like, unlike, pass, fail, dies_ok, lives_ok, skip, todo, diag, BAIL_OUT, and done_testing. It should print readable test output to stdout, include file and line info in failure messages, and handle planned tests, no plan, skipped tests, and TODO sections the way a lightweight test framework should.
Please make it easy to compile on Unix with a Makefile, and keep it portable enough that it also has a Windows build file if needed. Add a few example tests under a t folder so I can see how it works and verify the output matches TAP style. If anything needs looking up, check the current docs online first.
Are you gonna build this?
make sure you review the code using coderabbit