summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/CMakeLists.txt8
-rw-r--r--tools/h5dump/h5dump.c3
-rw-r--r--tools/h5dump/h5dump_ddl.c2
-rw-r--r--tools/h5dump/testh5dump.sh.in8
4 files changed, 20 insertions, 1 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 28d1ca2..b8a2d4c 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -152,6 +152,8 @@ IF (BUILD_TESTING)
${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks2.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl
@@ -289,6 +291,8 @@ IF (BUILD_TESTING)
${PROJECT_SOURCE_DIR}/errfiles/textlink.err
${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err
${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err
+ ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err
+ ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err
${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err
${PROJECT_SOURCE_DIR}/errfiles/tperror.err
${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err
@@ -1436,6 +1440,10 @@ IF (BUILD_TESTING)
ADD_H5_TEST (torderattr3 0 --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5)
ADD_H5_TEST (torderattr4 0 --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5)
+ # tests for link references and order
+ ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5)
+ ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5)
+
# tests for floating point user defined printf format
ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5)
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 1a70d11..cd52743 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1464,6 +1464,9 @@ main(int argc, const char *argv[])
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
+ /* Initialize indexing options */
+ h5trav_set_index(sort_by, sort_order);
+
while(opt_ind < argc) {
fname = HDstrdup(argv[opt_ind++]);
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index c0a9884..22d2a2b 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -1294,7 +1294,7 @@ dump_fcontents(hid_t fid)
}
/* print objects in the files */
- h5trav_print(fid, sort_by, sort_order);
+ h5trav_print(fid);
HDfprintf(rawoutstream, " %s\n",END);
}
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 752bff9..612b9ab 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -277,6 +277,8 @@ $SRC_H5DUMP_TESTFILES/torderattr3.ddl
$SRC_H5DUMP_TESTFILES/torderattr4.ddl
$SRC_H5DUMP_TESTFILES/tordercontents1.ddl
$SRC_H5DUMP_TESTFILES/tordercontents2.ddl
+$SRC_H5DUMP_TESTFILES/torderlinks1.ddl
+$SRC_H5DUMP_TESTFILES/torderlinks2.ddl
$SRC_H5DUMP_TESTFILES/tperror.ddl
$SRC_H5DUMP_TESTFILES/treference.ddl
$SRC_H5DUMP_TESTFILES/tsaf.ddl
@@ -326,6 +328,8 @@ ${SRC_H5DUMP_ERRORFILES}/textlink.err
${SRC_H5DUMP_ERRORFILES}/textlinkfar.err
${SRC_H5DUMP_ERRORFILES}/textlinksrc.err
${SRC_H5DUMP_ERRORFILES}/tgroup-2.err
+${SRC_H5DUMP_ERRORFILES}/torderlinks1.err
+${SRC_H5DUMP_ERRORFILES}/torderlinks2.err
${SRC_H5DUMP_ERRORFILES}/tperror.err
${SRC_H5DUMP_ERRORFILES}/tqmarkfile.err
${SRC_H5DUMP_ERRORFILES}/tslink-D.err
@@ -989,6 +993,10 @@ TOOLTEST torderattr2.ddl --enable-error-stack -H --sort_by=name --sort_order=des
TOOLTEST torderattr3.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5
TOOLTEST torderattr4.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5
+# tests for link references and order
+TOOLTEST4 torderlinks1.ddl --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5
+TOOLTEST4 torderlinks2.ddl --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5
+
# tests for floating point user defined printf format
TOOLTEST tfpformat.ddl --enable-error-stack -m %.7f tfpformat.h5