1#!/bin/sh
2#
3#       srecord - manipulate eprom load files
4#       Copyright (C) 1998, 1999, 2006-2008 Peter Miller
5#
6#       This program is free software; you can redistribute it and/or modify
7#       it under the terms of the GNU General Public License as published by
8#       the Free Software Foundation; either version 3 of the License, or
9#       (at your option) any later version.
10#
11#       This program is distributed in the hope that it will be useful,
12#       but WITHOUT ANY WARRANTY; without even the implied warranty of
13#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14#       GNU General Public License for more details.
15#
16#       You should have received a copy of the GNU General Public License
17#       along with this program. If not, see
18#       <http://www.gnu.org/licenses/>.
19#
20
21TEST_SUBJECT="basic srecord functionality"
22. test_prelude
23
24cat > test.in << 'fubar'
25S00600004844521B
26S1130000285F245F2212226A000424290008237C2A
27S11300100002000800082629001853812341001813
28S113002041E900084E42234300182342000824A952
29S107003000144ED492
30S5030004F8
31S9030000FC
32fubar
33if test $? -ne 0; then no_result; fi
34
35cat > test.ok << 'fubar'
36S00600004844521B
37S1230000285F245F2212226A000424290008237C0002000800082629001853812341001851
38S117002041E900084E42234300182342000824A900144ED418
39S5030002FA
40S9030000FC
41fubar
42if test $? -ne 0; then no_result; fi
43
44srec_cat test.in -o test.out
45if test $? -ne 0; then fail; fi
46
47diff test.ok test.out
48if test $? -ne 0; then fail; fi
49
50#
51# The things tested here, worked.
52# No other guarantees are made.
53#
54pass
55