unittest which uses a disk file

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Jan 17 01:06:51 UTC 2019


On Thu, Jan 17, 2019 at 12:58:20AM +0000, Victor Porton via Digitalmars-d-learn wrote:
> This way I would make data duplication (data files distributed with
> the source and the same data embedding as strings into my D sources).
[...]

You could use -J and string imports, perhaps?

In any case, if you only ever need to run unittests from within a main()
that never gets run by user code, then you could just version your
unittests like somebody else has suggested.  Then you could just make
assumptions about the current working directory and so on in your tests.


> Note that the source is multilingual (I am currently working on a
> multi-language bindings of a C library).

Not sure what this has to do with your question.


T

-- 
The two rules of success: 1. Don't tell everything you know. -- YHL


More information about the Digitalmars-d-learn mailing list