On Wednesday, 16 January 2019 at 21:07:24 UTC, Victor Porton
wrote:
What is the rule for unittest which uses a file (containing
example data for testing) available only in the source
distribution, not in binary distribution?
I am writing a library.
The library has also a file main.d which is compiled only in
DUB "application" configuration (I use this configuration
solely for testing.)
Maybe I should put unittest { } into main.d not in the module
which I test?
Also, what is the correct way to locate the file in the
filesystem?
Also if I choose to put any tests in main.d, should these tests
be within unittest { }? main.d is anyway meant to be compiled
only in unittest mode, so I'm unsure.