diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-Handles.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc index c872e9f..d2e2396 100644 --- a/tests/test-Handles.cc +++ b/tests/test-Handles.cc @@ -3,6 +3,7 @@ #include <Output.h> #include <Buffer.h> #include <BStream.h> +#include <ZHandle.h> #ifdef _WIN32 void ctime_r(const time_t * t, char * str) { @@ -103,5 +104,26 @@ void MainTask::Do() { TAssert(s == 12); TAssert(b->isEOF()); + { + IO<Output> o(new Output("tests/out.z")); + IO<ZStream> z(new ZStream(o)); + z->detach(); + z->writeString("foobar\n"); + } + + { + IO<Output> o(new Output("tests/out.gz")); + IO<ZStream> z(new ZStream(o, Z_BEST_COMPRESSION, ZStream::GZIP)); + z->detach(); + z->writeString("foobar\n"); + } + + { + IO<Output> o(new Output("tests/out.raw")); + IO<ZStream> z(new ZStream(o, Z_BEST_COMPRESSION, ZStream::RAW)); + z->detach(); + z->writeString("foobar\n"); + } + Printer::log(M_STATUS, "Test::Handles passed."); } |