diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-02 19:45:31 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-02 19:45:31 +0200 |
commit | dc9495df03f411d67eb46002670ffea12bdd32ba (patch) | |
tree | c0d8f4c7a2482f6564252638d2d5f3b1f05aacb2 /testsuite | |
parent | 80a3418b8c96300826842f109cd297280d3fbe05 (diff) | |
download | busybox-w32-dc9495df03f411d67eb46002670ffea12bdd32ba.tar.gz busybox-w32-dc9495df03f411d67eb46002670ffea12bdd32ba.tar.bz2 busybox-w32-dc9495df03f411d67eb46002670ffea12bdd32ba.zip |
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 @@ | |||
1 | #!/bin/sh | ||
2 | # Copyright 2009 by Denys Vlasenko | ||
3 | # Licensed under GPL v2, see file LICENSE for details. | ||
4 | |||
5 | . testing.sh | ||
6 | |||
7 | # testing "test name" "options" "expected result" "file input" "stdin" | ||
8 | |||
9 | # Simple one-block file transfer | ||
10 | # rx => 'C' | ||
11 | # rx <= SOH <blockno> <255-blockno> <128 byte padded with x1A> <crc> <crc> | ||
12 | # rx => ACK | ||
13 | # rx <= EOT | ||
14 | # rx => ACK | ||
15 | testing "rx" \ | ||
16 | "rx rx.OUTFILE | hexdump -vC && cat rx.OUTFILE" \ | ||
17 | "\ | ||
18 | 00000000 43 06 06 |C..|\n\ | ||
19 | 00000003\n\ | ||
20 | ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" \ | ||
21 | "" "\1\1\376\ | ||
22 | ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\ | ||
23 | \x1A\x1A\x1A\x1A\x1A\x4B\xB0\4" | ||
24 | |||
25 | rm -f rx.OUTFILE 2>/dev/null | ||
26 | |||
27 | exit $FAILCOUNT | ||