summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-06-24 20:04:07 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-06-24 20:04:07 (GMT)
commitee07744966b28206fb843716194786ad433171b6 (patch)
tree1467bac79bb20d790f8169e8fd6ef0c8ec7297b4 /tools/test/h5dump
parenta03d35dc22a4be89c09d923e439167de697510d0 (diff)
downloadhdf5-ee07744966b28206fb843716194786ad433171b6.zip
hdf5-ee07744966b28206fb843716194786ad433171b6.tar.gz
hdf5-ee07744966b28206fb843716194786ad433171b6.tar.bz2
HDFFV-9407 add autotools test
Diffstat (limited to 'tools/test/h5dump')
-rw-r--r--tools/test/h5dump/testh5dump.sh.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index e1c02cf..c4efd8f 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -34,6 +34,7 @@ H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
RM='rm -rf'
CMP='cmp'
DIFF='diff -c'
+GREP='grep'
CP='cp'
DIRNAME='dirname'
LS='ls'
@@ -83,6 +84,7 @@ $SRC_H5DUMP_TESTFILES/charsets.h5
$SRC_H5DUMP_TESTFILES/file_space.h5
$SRC_H5DUMP_TESTFILES/filter_fail.h5
$SRC_H5DUMP_TESTFILES/packedbits.h5
+$SRC_H5DUMP_TESTFILES/t128bit_float.h5
$SRC_H5DUMP_TESTFILES/taindices.h5
$SRC_H5DUMP_TESTFILES/tall.h5
$SRC_H5DUMP_TESTFILES/tarray1.h5
@@ -903,6 +905,30 @@ TOOLTEST_HELP() {
}
+# Call the h5dump tool and grep for a value
+#
+GREPTEST()
+{
+ expectdata=$1
+ actual=$TESTDIR/$2
+ actual_err="$TESTDIR/`basename $2 .ddl`.oerr"
+ shift
+
+ # Run test.
+ TESTING $DUMPER -p $@
+ (
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ ) >$actual 2>$actual_err
+ $GREP $expectdata $actual > /dev/null
+ if [ $? -eq 0 ]; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
+ fi
+}
+
# Print a "SKIP" message
SKIP() {
TESTING $DUMPER $@
@@ -1363,6 +1389,9 @@ TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
# test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue
TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
+# test to verify HDFFV-9407: long double full precision
+GREPTEST "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR