tanoku/clar — pull request #23 by arrbee (2012-07-13 18:51:24+00:00)
Title: Add categories to clar

This adds test suite categories to clar as discussed by @nulltoken and @carlosmn here: https://github.com/libgit2/libgit2/pull/537#issuecomment-3555593

To use the new functionality, add a `test_suite__categorize()` method and call `cl_in_category()` one or more times to add the current file to a particular category. There is a "default" category that all files are added to if they don't explicitly have a `categorize` method.

On the command line, you can then write: `test -i -i` to include those categories in the run. The "default" category will be run if no `-i` arguments are given. If there are `-i` arguments, then an explicit `-idefault` (or `-i=default` works too) is needed to run the default tests.

Also, I added a `-l` command line option to list all test suites (by number and name) and to list all categories. This just makes it easier to see what choices you have for `-s` selectively running a suite and for `-i` selectively running a category.