diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-02 21:45:31 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-02 21:45:31 +0400 |
commit | dc9495df03f411d67eb46002670ffea12bdd32ba (patch) | |
tree | c0d8f4c7a2482f6564252638d2d5f3b1f05aacb2 /testsuite | |
parent | 80a3418b8c96300826842f109cd297280d3fbe05 (diff) |
rx: strip padding from last block. closes bug 501.
function old new delta
rx_main 876 974 +98
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/rx.tests | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/rx.tests b/testsuite/rx.tests new file mode 100644 index 000000000..417f04b57 --- /dev/null +++ b/testsuite/rx.tests @@ -0,0 +1,27 @@ +#!/bin/sh +# Copyright 2009 by Denys Vlasenko +# Licensed under GPL v2, see file LICENSE for details. + +. testing.sh + +# testing "test name" "options" "expected result" "file input" "stdin" + +# Simple one-block file transfer +# rx => 'C' +# rx <= SOH <blockno> <255-blockno> <128 byte padded with x1A> <crc> <crc> +# rx => ACK +# rx <= EOT +# rx => ACK +testing "rx" \ + "rx rx.OUTFILE | hexdump -vC && cat rx.OUTFILE" \ +"\ +00000000 43 06 06 |C..|\n\ +00000003\n\ +???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" \ + "" "\1\1\376\ +???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\ +\x1A\x1A\x1A\x1A\x1A\x4B\xB0\4" + +rm -f rx.OUTFILE 2>/dev/null + +exit $FAILCOUNT |