This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
		
			
				
	
	
		
			28 lines
		
	
	
		
			852 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			852 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
# Copyright 2009 by Denys Vlasenko
 | 
						|
# Licensed under GPLv2, see file LICENSE in this source tree.
 | 
						|
 | 
						|
. ./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\
 | 
						|
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" \
 | 
						|
	"" "\01\01\0376\
 | 
						|
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\
 | 
						|
\x1A\x1A\x1A\x1A\x1A\x4B\xB0\04"
 | 
						|
 | 
						|
rm -f rx.OUTFILE 2>/dev/null
 | 
						|
 | 
						|
exit $FAILCOUNT
 |