summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Handles.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc
index c8a650f..3b69992 100644
--- a/tests/test-Handles.cc
+++ b/tests/test-Handles.cc
@@ -261,6 +261,7 @@ class StacklessTaskTest : public StacklessTask {
const char * getName() const { return "StacklessTaskTest"; }
IO<Handle> h;
IO<ZStream> z;
+ uint8_t data[dg.size];
};
void StacklessTaskTest::Do() {
@@ -274,6 +275,12 @@ void StacklessTaskTest::Do() {
z = new ZStream(h, Z_BEST_COMPRESSION, ZStream::GZIP);
StacklessOperation(z->write(dg.getData(), dg.size));
StacklessOperation(z->close());
+ h = new Input("tests/data.gz");
+ StacklessOperation(h.asA<Input>()->open());
+ z = new ZStream(h, Z_BEST_COMPRESSION, ZStream::GZIP);
+ StacklessOperation(z->read(data, dg.size));
+ TAssert(memcmp(dg.getData(), data, dg.size) == 0);
+ StacklessOperation(z->close());
StacklessEnd();
}