summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Handles.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc
index f9fd055..fd05c76 100644
--- a/tests/test-Handles.cc
+++ b/tests/test-Handles.cc
@@ -1,6 +1,7 @@
#include <Main.h>
#include <Input.h>
#include <Output.h>
+#include <Buffer.h>
#ifdef _WIN32
void ctime_r(const time_t * t, char * str) {
@@ -70,5 +71,16 @@ void MainTask::Do() {
Assert(s == 0);
o->write("foo\n", 4);
+ IO<Handle> b(new Buffer());
+ s = b->rtell();
+ Assert(s == 0);
+ s = b->wtell();
+ Assert(s == 0);
+ b->write("foo\n", 4);
+ s = b->rtell();
+ Assert(s == 0);
+ s = b->wtell();
+ Assert(s == 4);
+
Printer::log(M_STATUS, "Test::Handles passed.");
}