eBay / tsv-utils

eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.
https://ebay.github.io/tsv-utils/
Boost Software License 1.0
1.42k stars 80 forks source link

Run built-in unit tests in Windows builds (dmd-only) #315

Closed jondegenhardt closed 3 years ago

jondegenhardt commented 3 years ago

This PR adds built-in unit tests to the Window CI test suite. It follows-on PR #313, which successfully got a dub compile and build to run. At present the built-in unit tests are run on DMD only. LDC produces a small number of deltas due to differences in format output (more detail below).

Using make unittest has the effect of running all the built-in unit tests (in the source code files). However, it does not run the command line test suite (make test). The built-in unit tests are a substantial indication of progress though.

This PR makes a number of small code changes to accommodate Windows. The main changes where:

An attempt was to run command line tests with make test. This will take more work, because the error tests produce Windows newline results on Windows, but the gold set was generated On Unix. It will take more time to identify a reasonable way to rectify these cases without also compromising the non-error tests. (Error messages, help messages, etc., should generate Windows newlines, on Windows, even if regular TSV results output generates Unix newlines.

Overall these changes go a long way towards having a solid Windows test platform.