Routing of AssertError messages

DLearner bmqazwsx123 at gmail.com
Sat Jul 31 12:03:49 UTC 2021


Hi

This may be due to Windows, not DMD.

Please see code below (held in test.d):

```
void main() {
    import std.stdio;

    writeln("Test");
    assert(false, "TestAssert");
}
```
`
dmd -i -run test.d
`
results in both "Test" and the "TestAssert" string (and trace) 
being routed to screen.

But
`
dmd -i -run test.d > op.txt
`
results in only "Test" going into op.txt, the "TestAssert" string 
(and trace) being routed to screen as before.

I expected both "Test" and the "TestAssert" string (and trace) to 
go into op.txt.

The idea was to use op.txt as documentation of a successful test 
of the "TestAssert" string.

Best regards


More information about the Digitalmars-d-learn mailing list