From 60145e983e11d9ed8d561e269fb1e22caec1ed01 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 3 Oct 2009 19:07:16 -0500 Subject: [PATCH] add unit test for c stream-tell --- core/io/streams/c/c-tests.factor | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/io/streams/c/c-tests.factor b/core/io/streams/c/c-tests.factor index 6a82d6d545..657c6ccd75 100644 --- a/core/io/streams/c/c-tests.factor +++ b/core/io/streams/c/c-tests.factor @@ -1,5 +1,5 @@ USING: tools.test io.files io.files.temp io io.streams.c -io.encodings.ascii strings ; +io.encodings.ascii strings destructors kernel ; IN: io.streams.c.tests [ "hello world" ] [ @@ -8,3 +8,12 @@ IN: io.streams.c.tests "test.txt" temp-file "rb" fopen stream-contents >string ] unit-test + +[ 0 ] +[ "test.txt" temp-file "rb" fopen [ stream-tell ] [ dispose ] bi ] unit-test + +[ 3 ] [ + "test.txt" temp-file "rb" fopen + 3 over stream-read drop + [ stream-tell ] [ dispose ] bi +] unit-test