blob: 417f04b575e270f82fae540bf2c4a5aeefe80755 [file] [log] [blame]
Denys Vlasenkodc9495d2009-08-02 19:45:31 +02001#!/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
15testing "rx" \
16 "rx rx.OUTFILE | hexdump -vC && cat rx.OUTFILE" \
17"\
1800000000 43 06 06 |C..|\n\
1900000003\n\
20???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" \
21 "" "\1\1\376\
22???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\
23\x1A\x1A\x1A\x1A\x1A\x4B\xB0\4"
24
25rm -f rx.OUTFILE 2>/dev/null
26
27exit $FAILCOUNT