haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
668 stars 96 forks source link

Passing isFromStdOut:true when stderr's logs #292

Closed haf closed 5 years ago

haf commented 5 years ago

https://github.com/haf/expecto/blob/522bd510d98fd2cd953955e11285ed688d210322/Expecto/Logging.fs#L997 ...calling https://github.com/haf/expecto/blob/522bd510d98fd2cd953955e11285ed688d210322/Expecto/Logging.fs#L921

@AnthonyLloyd How come the line above is ...true true, rather than true false, in the error case?

haf commented 5 years ago

This is because FuncTextWriter inverts the control flow; so fromStdOut doesn't mean from STDOUT, it means; from global console's text writer; in that case, we buffer the output if necessary.