summaryrefslogtreecommitdiffstats
path: root/tools/h5copy/h5copygentest.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-14 16:31:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-14 16:31:11 (GMT)
commitf6a22fb0de3b415d3c7fe9ad2e3c1a72bd0334ab (patch)
tree23a2cf7c8b2af26745b0613b112e1e2ae401a2f9 /tools/h5copy/h5copygentest.c
parent8891e2433a9849571373a9512b6e292ba4cde54e (diff)
downloadhdf5-f6a22fb0de3b415d3c7fe9ad2e3c1a72bd0334ab.zip
hdf5-f6a22fb0de3b415d3c7fe9ad2e3c1a72bd0334ab.tar.gz
hdf5-f6a22fb0de3b415d3c7fe9ad2e3c1a72bd0334ab.tar.bz2
[svn-r13301] Description:
Add '-p' flag to h5copy tool, to create intermediate "parent" groups that don't exist in destination file yet. Add more tests to h5copy script. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'tools/h5copy/h5copygentest.c')
-rw-r--r--tools/h5copy/h5copygentest.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c
index c9dc01f..ee6862a 100644
--- a/tools/h5copy/h5copygentest.c
+++ b/tools/h5copy/h5copygentest.c
@@ -29,6 +29,7 @@
#define DATASET_NESTED_VL "nested_vl"
#define GROUP_EMPTY "grp_empty"
#define GROUP_DATASETS "grp_dsets"
+#define GROUP_NESTED "grp_nested"
/*-------------------------------------------------------------------------
@@ -364,6 +365,28 @@ static void gent_nested_datasets(hid_t loc_id)
}
/*-------------------------------------------------------------------------
+ * Function: gent_nested_group
+ *
+ * Purpose: Generate a group in a location and populate it with another group
+ * containing the "standard" datasets
+ *
+ *-------------------------------------------------------------------------
+ */
+static void gent_nested_group(hid_t loc_id)
+{
+ hid_t gid;
+
+ /* Create group in location */
+ gid = H5Gcreate(loc_id, GROUP_NESTED, (size_t)0);
+
+ /* Add datasets to group created */
+ gent_nested_datasets(gid);
+
+ /* Release resources */
+ H5Gclose(gid);
+}
+
+/*-------------------------------------------------------------------------
* Function: main
*
*-------------------------------------------------------------------------
@@ -378,6 +401,7 @@ int main(void)
gent_datasets(fid);
gent_empty_group(fid);
gent_nested_datasets(fid);
+ gent_nested_group(fid);
H5Fclose(fid);
return 0;