diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 19:59:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 19:59:03 +0000 |
commit | a848231ae0f346dc7cc000973fbeb65b0894ee92 (patch) | |
tree | 44b60b367c86723cc78383ef247885d72b388afe /src/util/vstream_test.ref | |
parent | Initial commit. (diff) | |
download | postfix-a848231ae0f346dc7cc000973fbeb65b0894ee92.tar.xz postfix-a848231ae0f346dc7cc000973fbeb65b0894ee92.zip |
Adding upstream version 3.8.5.upstream/3.8.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/util/vstream_test.ref')
-rw-r--r-- | src/util/vstream_test.ref | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/util/vstream_test.ref b/src/util/vstream_test.ref new file mode 100644 index 0000000..eaa9952 --- /dev/null +++ b/src/util/vstream_test.ref @@ -0,0 +1,41 @@ +buffer size test: copy text with 1 buffer size, ignore requests to shrink +abcdef +actual read/write buffer sizes: 1/1 + +buffer size test: copy text with 2 buffer size, ignore requests to shrink +ghijkl +actual read/write buffer sizes: 2/2 + +buffer size test: copy text with 1 buffer size, ignore requests to shrink +mnopqr +actual read/write buffer sizes: 2/2 + +formatting test: print a number +1234567890 + +memory stream test prep: prefill the VSTRING +VSTRING content length: 8/8, content: 01234567 + +memory stream test: open the VSTRING for writing, overwrite, close +initial memory VSTREAM write offset: 0/8 +final memory VSTREAM write offset: 5/8 +VSTRING content length: 5/8, content: hallo + +memory stream test: open the VSTRING for append, write multiple, then overwrite 1 +initial memory VSTREAM write offset: 5/8 +final memory VSTREAM write offset: 11/16 +VSTRING content length: 11/16, content: hallo world + +replace second character and close +VSTRING content length: 11/16, content: hello world + +memory stream test: open VSTRING for reading, then read +initial memory VSTREAM read offset: 0/11 +reading memory VSTREAM: hello world +final memory VSTREAM read offset: 11/11 +seeking to offset 12 should work: PASS +VSTREAM_GETC should return VSTREAM_EOF +PASS +final memory VSTREAM read offset: 12/11 +VSTRING content length: 11/16, content: hello world + |