From 8c26f6f689194e52e357ab2a90997a3076be238b Mon Sep 17 00:00:00 2001 From: fenugrec Date: Wed, 26 Apr 2023 20:31:18 -0400 Subject: [PATCH] tests: add nibble_swap input filter test --- test/02/t0269a.sh | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 test/02/t0269a.sh diff --git a/test/02/t0269a.sh b/test/02/t0269a.sh new file mode 100644 index 00000000..a01fe778 --- /dev/null +++ b/test/02/t0269a.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# srecord - manipulate eprom load files +# Copyright (C) 2023 fenugrec +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# . +# + +TEST_SUBJECT="nibble swap filter" +. test_prelude.sh + +cat > test.in << 'fubar' +S00600004844521B +S1070000F08008552B +S5030001FB +fubar +if test $? -ne 0; then no_result; fi + +cat > test.ok << 'fubar' +S00600004844521B +S10700000F0880550C +S5030001FB +fubar +if test $? -ne 0; then no_result; fi + +srec_cat test.in -ns -o test.out +if test $? -ne 0; then fail; fi + +diff test.ok test.out +if test $? -ne 0; then fail; fi + +# +# The things tested here, worked. +# No other guarantees are made. +# +pass