add libcheck unit tests for wildmatch
Quite a large PR, with some opinions baked into it.
-
add optional detection and use of lib check for unit testing
-
minor modifications to source files to make it easier to get them under unit tests (eg # ifndef wrappers)
-
Quite a lot of unit test code that is aiming for full coverage without being a clear documentation of behavior.
My goal here is to start getting unit tests in place that hold the behavior fixed, which will make it easier to refactor code without changing behavior, and also, replace the unit test code that is working hard to cover some branch with a more idiomatic test that helps explain why that branch is there and what makes it hard to cover.
@WayneD let me know if this approach is okay, or if you have a preference for some other tooling (eg something else instead of lib check).
Also, if you'd rather see more smaller PRs, I can break this down so it's not one huge thing.
Ah, evidently I didn't test the "what if there is no lib check" case, and it's failing the build. I will correct the makefile to only build the lib check based tests if lib check is present.
Closing for inactivity