Denys Vlasenko | dc9495d | 2009-08-02 19:45:31 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # Copyright 2009 by Denys Vlasenko |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 3 | # Licensed under GPLv2, see file LICENSE in this source tree. |
Denys Vlasenko | dc9495d | 2009-08-02 19:45:31 +0200 | [diff] [blame] | 4 | |
Mike Frysinger | caa7940 | 2009-11-04 18:41:22 -0500 | [diff] [blame] | 5 | . ./testing.sh |
Denys Vlasenko | dc9495d | 2009-08-02 19:45:31 +0200 | [diff] [blame] | 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 | ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" \ |
Denys Vlasenko | e82cf33 | 2010-05-12 15:59:32 +0200 | [diff] [blame] | 21 | "" "\01\01\0376\ |
Denys Vlasenko | dc9495d | 2009-08-02 19:45:31 +0200 | [diff] [blame] | 22 | ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\ |
Denys Vlasenko | e82cf33 | 2010-05-12 15:59:32 +0200 | [diff] [blame] | 23 | \x1A\x1A\x1A\x1A\x1A\x4B\xB0\04" |
Denys Vlasenko | dc9495d | 2009-08-02 19:45:31 +0200 | [diff] [blame] | 24 | |
| 25 | rm -f rx.OUTFILE 2>/dev/null |
| 26 | |
| 27 | exit $FAILCOUNT |