--- /dev/null
+for file in `ls -1 tests/data-*-err`; do
+ echo -n "Testing ${file}... ";
+ LC_ALL=C ./sadf -H $file 2>&1 | grep "Invalid system" >/dev/null && echo "OK" || exit 1;
+done
+
+
--- /dev/null
+# Should be OK with sadf, and generate an error with sar
+LC_ALL=C ./sadf -H tests/data-12.6.0-file_act-types_nr-SARerr >/dev/null && ./sar -f tests/data-12.6.0-file_act-types_nr-SARerr 2>&1 | grep "Invalid system" >/dev/null
+
00720 LC_ALL=C TZ=GMT ./sar -w -f tests/data32-ssr.tmp > tests/out.sar32-ssr.tmp
00725 LC_ALL=C TZ=GMT ./sar -A -f tests/data32-ssr.tmp >/dev/null
+===== Testing ill-formed datafiles
+00730 LC_ALL=C ./sadf -H $file 2>&1 | grep "Invalid system" >/dev/null && echo "OK" || exit 1;
+00732 LC_ALL=C ./sadf -H tests/data-12.6.0-file_act-types_nr-SARerr >/dev/null && ./sar -f tests/data-12.6.0-file_act-types_nr-SARerr 2>&1 | grep "Invalid system" >/dev/null
+
===== Reading datafile with non printable chrs in comment (created using hexedit)
00740 LC_ALL=C TZ=GMT ./sar -C -f tests/data-non-printable > tests/out.sar-non-printable.tmp