I need to test code that fetches and processes some data from standard C library. However, this data may not be installed at any particular system. So at the start of each test I detect whether the data is installed and skip the test.
It's easy to wrap the test in an if, but since the code that tests whether the test is possible may itself fail, I need to at least know that the tests were skipped. I know I can't simply use println!
and I don't want to have to remember to pass --nocapture
every time I test (and I want to see the warnings in the Travis log; Travis virtuals don't have all the data).