Add "consume all captured output" callback to CaptureFD
authorAlexey Spiridonov <lesha@fb.com>
Sat, 3 Oct 2015 05:30:41 +0000 (22:30 -0700)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Sat, 3 Oct 2015 06:20:19 +0000 (23:20 -0700)
commit338a260317f0e7926df1fb01d8dc432c8b07cb57
treed6e951a71cab1dd3d72688c5f4f67c517c7f4c06
parent62504e55283a9b3072c6eb8f88fd0e67c14414e7
Add "consume all captured output" callback to CaptureFD

Summary: I noticed myself trying to fake this kind of callback for a log-based test I was writing. It seems much nicer to add the callback to `CaptureFD` than roll ugly wrappers around it to do the same thing.

Reviewed By: @yfeldblum

Differential Revision: D2506106
folly/experimental/TestUtil.cpp
folly/experimental/TestUtil.h
folly/experimental/test/TestUtilTest.cpp