-#! /bin/sh\r
-#----------------------------------------------------------------------------\r
-# test suite for IRMP\r
-#\r
-# usage:\r
-#\r
-# ./test-suite.sh\r
-#\r
-# Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de\r
-#\r
-# $Id: test-suite.sh,v 1.6 2010/05/25 14:44:41 fm Exp $\r
-#----------------------------------------------------------------------------\r
-\r
-for j in \\r
- Dbox.txt \\r
- DK_Digital.txt \\r
- Grundig_TP715.txt \\r
- Grundig_TP715_SatTV.txt \\r
- Grundig_TP715_Video.txt \\r
- Matsushita.txt \\r
- Nokia.txt \\r
- Panasonic-Blue-Ray.txt \\r
- RC5-Taste.txt \\r
- Samsung_DVD_Rec_00062C.txt \\r
- Samsung_TV.txt \\r
- Sony-RM-S-310.txt \\r
- sony-rm-s311.txt \\r
- Sony-RM-U305C.txt \\r
- Sony-RMT-D142P-DVD.txt \\r
- Sony-RMT-V406.txt \\r
- Sony_RM-S315_lange.txt \\r
- Sony_Bravia_RM-ED0009_new.txt \\r
- Yamaha-RAV388.txt \\r
- apple.txt \\r
- bo_beolink1000-10kHz.txt \\r
- denon.txt \\r
- elta_radio.txt \\r
- nec-repetition.txt \\r
- nec.txt \\r
- nubert-subwoofer.txt \\r
- orion_vcr_07660BM070.txt \\r
- panasonic-scan.txt \\r
- rc5.txt \\r
- rc5x-79.txt \\r
- rc5x.txt \\r
- rc6-hold.txt \\r
- rc6.txt \\r
- sharp-denon.txt \\r
- sharp-denon2.txt\r
-do\r
- echo "testing $j ..."\r
- if ../irmp < $j | grep -q error\r
- then\r
- ../irmp < $j | grep error\r
- echo "test failed"\r
- exit 1\r
- fi\r
-done\r
-echo "all tests successful"\r
-exit 0\r
+#! /bin/sh
+#----------------------------------------------------------------------------
+# test suite for IRMP
+#
+# usage:
+#
+# ./test-suite.sh
+#
+# Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de
+#
+# $Id: test-suite.sh,v 1.10 2010/06/09 12:04:04 fm Exp $
+#----------------------------------------------------------------------------
+
+set -e # exit on error
+cd `dirname $0`
+mkdir -p tmpsrc
+cp ../irmp.[ch] ../irmpconfig.h ../irsnd.[ch] ../irsndconfig.h ../makefile.lnx tmpsrc
+cd tmpsrc
+sed 's/#define \(IRMP_SUPPORT_[A-Z_0-9]* *\)[01]/#define \1 1/g' <irmpconfig.h >irmpconfig.new
+mv irmpconfig.new irmpconfig.h
+make -f makefile.lnx clean
+make -f makefile.lnx all
+cd ..
+
+for j in \
+ Dbox.txt \
+ DK_Digital.txt \
+ Grundig_TP715.txt \
+ Grundig_TP715_SatTV.txt \
+ Grundig_TP715_Video.txt \
+ Kathrein-UFS-912-Remote.txt \
+ Matsushita.txt \
+ Nokia.txt \
+ Panasonic-Blue-Ray.txt \
+ RC5-Taste.txt \
+ Samsung_DVD_Rec_00062C.txt \
+ Samsung_TV.txt \
+ Sony-RM-S-310.txt \
+ sony-rm-s311.txt \
+ Sony-RM-U305C.txt \
+ Sony-RMT-D142P-DVD.txt \
+ Sony-RMT-V406.txt \
+ Sony_RM-S315_lange.txt \
+ Sony_Bravia_RM-ED0009_new.txt \
+ Yamaha-RAV388.txt \
+ apple.txt \
+ apple-unibody-remote.txt \
+ bo_beolink1000-10kHz.txt \
+ denon.txt \
+ elta_radio.txt \
+ fdc.txt \
+ jvc.txt \
+ nec-repetition.txt \
+ nec-skymaster-dt500.txt \
+ nec.txt \
+ nikon.txt \
+ nubert-subwoofer.txt \
+ orion_vcr_07660BM070.txt \
+ panasonic-scan.txt \
+ rc-car.txt \
+ rc5.txt \
+ rc5x-79.txt \
+ rc5x.txt \
+ rc6-hold.txt \
+ rc6.txt \
+ t-home-mediareceiver.txt \
+ sharp-denon.txt \
+ sharp-denon2.txt \
+ xbox360-10kHz.txt
+do
+ echo "testing $j ..."
+ if tmpsrc/irmp -v < $j | grep -q error
+ then
+ tmpsrc/irmp -v < $j | grep error
+ echo "test failed"
+ exit 1
+ fi
+done
+
+for j in \
+ Siemens-Gigaset-M740AV-15kHz.txt \
+ bo_beolink1000-15kHz.txt \
+ denon-15kHz.txt \
+ xbox360-15kHz.txt
+do
+ echo "testing $j ..."
+ if tmpsrc/irmp-15kHz -v < $j | grep -q error
+ then
+ tmpsrc/irmp-15kHz -v < $j | grep error
+ echo "test failed"
+ exit 1
+ fi
+done
+
+for j in \
+ rc-car-20kHz.txt \
+ fdc-20kHz.txt \
+ fdc2-20kHz.txt
+do
+ echo "testing $j ..."
+ if tmpsrc/irmp-20kHz -v < $j | grep -q error
+ then
+ tmpsrc/irmp-20kHz -v < $j | grep error
+ echo "test failed"
+ exit 1
+ fi
+done
+
+rm -rf tmpsrc
+
+echo "all tests successful"
+exit 0