On Monday, 5 June 2023 at 18:22:45 UTC, Ernesto Castellotti wrote:
[...]
It's not so easy to deal automatically in case of multiple modules

_multiple modules_

The following code, in a batch (.bat) file, works for me:
```
@echo off
:loop
if [%1]==[] goto loopexit
type .\%1.d > .\__temp_%1.d
echo extern(C) void main() { static foreach(u; __traits(getUnitTests, __traits(parent, main))) u();} >> .\__temp_%1.d
dmd -betterC -unittest -i -run .\__temp_%1.d
del .\__temp_%1.d
shift
goto loop
:loopexit
```



  • Re: unittest und... ryuukk_ via Digitalmars-d-learn
    • Re: unittes... DLearner via Digitalmars-d-learn
    • Re: unittes... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: uni... ryuukk_ via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Mike Parker via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Mike Parker via Digitalmars-d-learn
        • Re:... DLearner via Digitalmars-d-learn
        • Re:... Ernesto Castellotti via Digitalmars-d-learn
        • Re:... DLearner via Digitalmars-d-learn

Reply via email to