rsync icon indicating copy to clipboard operation
rsync copied to clipboard

add libcheck unit tests for wildmatch

Open smikes opened this issue 3 years ago • 2 comments

Quite a large PR, with some opinions baked into it.

  1. add optional detection and use of lib check for unit testing

  2. minor modifications to source files to make it easier to get them under unit tests (eg # ifndef wrappers)

  3. 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.

smikes avatar Mar 26 '22 19:03 smikes

@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.

smikes avatar Mar 26 '22 19:03 smikes

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.

smikes avatar Mar 26 '22 19:03 smikes

Closing for inactivity

smikes avatar Sep 10 '22 03:09 smikes