summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-09-06 17:28:26 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-09-06 17:28:26 (GMT)
commit35b22a13a8d3a3479a166f1dd12d32d44d0a81ab (patch)
tree4013d1b5615ddae08dc0eb9112ec28608a37c6a3 /tools/h5dump
parent3d7776ffee0e31d74f06cc2718921114d909777f (diff)
downloadhdf5-35b22a13a8d3a3479a166f1dd12d32d44d0a81ab.zip
hdf5-35b22a13a8d3a3479a166f1dd12d32d44d0a81ab.tar.gz
hdf5-35b22a13a8d3a3479a166f1dd12d32d44d0a81ab.tar.bz2
[svn-r24106] Add help text tests for h5dump and h5repack to the linux scripts. HDFFV-8498 merge from trunk.
Tested: local linux - cmake and autotools
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/testh5dump.sh.in36
1 files changed, 35 insertions, 1 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 797f9b8..b1c2a82 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -795,6 +795,40 @@ TOOLTEST5() {
fi
}
+# ADD_HELP_TEST
+TOOLTEST_HELP() {
+
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .txt`.out"
+ actual_err="$TESTDIR/`basename $1 .txt`.err"
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect-CREATED
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected output (*.txt) differs from actual output (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+
+}
# Print a "SKIP" message
SKIP() {
@@ -871,7 +905,7 @@ IMPORTTEST()
# prepare for test
COPY_TESTFILES_TO_TESTDIR
-#TOOLTEST h5dump-help.txt -h
+TOOLTEST_HELP h5dump-help.txt -h
# test data output redirection
TOOLTEST tnoddl.ddl --enable-error-stack --ddl -y packedbits.h5