summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/h5dump/testh5dump.sh.in19
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 6944701..2fc09da 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -438,8 +438,21 @@ TESTING() {
# the actual output file is calculated by replacing the `.ddl' with
# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a
# non-zero value.
+# If $1 == ignorecase then do caseless CMP and DIFF.
# ADD_H5_TEST
TOOLTEST() {
+ # check if caseless compare and diff requested
+ if [ "$1" = ignorecase ]; then
+ caseless="-i"
+ # replace cmp with diff which runs much longer.
+ xCMP="$DIFF -i"
+ shift
+ else
+ caseless=""
+ # stick with faster cmp if ignorecase is not requested.
+ xCMP="$CMP"
+ fi
+
expect="$TESTDIR/$1"
actual="$TESTDIR/`basename $1 .ddl`.out"
actual_err="$TESTDIR/`basename $1 .ddl`.err"
@@ -465,13 +478,13 @@ TOOLTEST() {
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
- elif $CMP $expect $actual; then
+ elif $xCMP $expect $actual > /dev/null 2>&1 ; then
echo " PASSED"
else
echo "*FAILED*"
echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
@@ -1018,7 +1031,7 @@ TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
#test for the nested compound type
TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5
TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5
-TOOLTEST tcompound_enum.ddl --enable-error-stack tcompound_enum.h5
+TOOLTEST ignorecase tcompound_enum.ddl --enable-error-stack tcompound_enum.h5
# test for options
TOOLTEST4 tall-1.ddl --enable-error-stack tall.h5