summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2006-06-18 17:41:58 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2006-06-18 17:41:58 (GMT)
commit09aa1fa82c81ad132bea88a9ee81d30952daa274 (patch)
tree04f0983aff52b8be299f30fdd34bd281ab3e168f /tools/misc
parentb73313b3d41e4bf1447b89c41cfdcaf40dd6f078 (diff)
downloadhdf5-09aa1fa82c81ad132bea88a9ee81d30952daa274.zip
hdf5-09aa1fa82c81ad132bea88a9ee81d30952daa274.tar.gz
hdf5-09aa1fa82c81ad132bea88a9ee81d30952daa274.tar.bz2
[svn-r12418] Purpose: Maintenance/new feature
Description: Added new tests for the h5stat tool; added --version flag to the h5stat tool to display library version information Solution: Platforms tested: heping, shanti Misc. update:
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/h5stat.c14
-rw-r--r--tools/misc/testh5stat.sh.in11
2 files changed, 23 insertions, 2 deletions
diff --git a/tools/misc/h5stat.c b/tools/misc/h5stat.c
index db93471..a396472 100644
--- a/tools/misc/h5stat.c
+++ b/tools/misc/h5stat.c
@@ -101,7 +101,7 @@ static int display_dset = FALSE;
static int display_dtype_metadata = FALSE;
static int display_dtype = FALSE;
-static const char *s_opts ="FfhGgDdT";
+static const char *s_opts ="FfhGgDdTV";
static struct long_options l_opts[] = {
{"help", no_arg, 'h'},
{"hel", no_arg, 'h'},
@@ -149,6 +149,12 @@ static struct long_options l_opts[] = {
{"dtypeme", no_arg, 'T'},
{"dtypem", no_arg, 'T'},
{"dtype", no_arg, 'T'},
+ { "version", no_arg, 'V' },
+ { "versio", no_arg, 'V' },
+ { "versi", no_arg, 'V' },
+ { "vers", no_arg, 'V' },
+ { "ver", no_arg, 'V' },
+ { "ve", no_arg, 'V' },
{ NULL, 0, '\0' }
};
@@ -174,6 +180,7 @@ static void
fprintf(stdout, "\n");
fprintf(stdout, " OPTIONS\n");
fprintf(stdout, " -h, --help Print a usage message and exit\n");
+ fprintf(stdout, " -V, --version Print version number and exit\n");
fprintf(stdout, " -f, --file Print file information\n");
fprintf(stdout, " -F, --filemetadata Print file metadata\n");
fprintf(stdout, " -g, --group Print group information\n");
@@ -659,6 +666,11 @@ parse_start:
case 'h':
usage(progname);
leave(EXIT_SUCCESS);
+ case 'V':
+ print_version(progname);
+ leave(EXIT_SUCCESS);
+ break;
+
default:
usage(progname);
leave(EXIT_FAILURE);
diff --git a/tools/misc/testh5stat.sh.in b/tools/misc/testh5stat.sh.in
index 1981f7b..0857b3c 100644
--- a/tools/misc/testh5stat.sh.in
+++ b/tools/misc/testh5stat.sh.in
@@ -106,9 +106,18 @@ SKIP() {
##############################################################################
##############################################################################
-# test for help flag
+# Test for help flag
TOOLTEST h5stat_help1.ddl -h
TOOLTEST h5stat_help2.ddl --help
+
+# Test file with groups, compressed datasets, user-applied fileters, etc.
+# h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4
+TOOLTEST h5stat_filters.ddl h5stat_filters.h5
+TOOLTEST h5stat_filters-f.ddl -f h5stat_filters.h5
+TOOLTEST h5stat_filters-F.ddl -F h5stat_filters.h5
+TOOLTEST h5stat_filters-d.ddl -d h5stat_filters.h5
+TOOLTEST h5stat_filters-g.ddl -g h5stat_filters.h5
+TOOLTEST h5stat_filters-dT.ddl -dT h5stat_filters.h5
echo