summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuey-Hsia Li <rli@ncsa.uiuc.edu>1998-10-29 06:40:30 (GMT)
committerRuey-Hsia Li <rli@ncsa.uiuc.edu>1998-10-29 06:40:30 (GMT)
commit8d2cb24e512c43b075ad50b6d664e2843918d942 (patch)
treee97f1af422ce7c65cdd0807ea1fe4053f60608a7
parent049e666104470f74f45af5b00aa83d336ba53bf5 (diff)
downloadhdf5-8d2cb24e512c43b075ad50b6d664e2843918d942.zip
hdf5-8d2cb24e512c43b075ad50b6d664e2843918d942.tar.gz
hdf5-8d2cb24e512c43b075ad50b6d664e2843918d942.tar.bz2
[svn-r827] Updated expected output for dumper tests.
-rw-r--r--tools/testfiles/h5dumptst.c165
-rw-r--r--tools/testfiles/tall-1.ddl41
-rw-r--r--tools/testfiles/tall-3.ddl6
-rw-r--r--tools/testfiles/tall.ddl60
-rw-r--r--tools/testfiles/tall.h5bin7836 -> 7836 bytes
-rw-r--r--tools/testfiles/tattr-1.ddl14
-rw-r--r--tools/testfiles/tattr-2.ddl8
-rw-r--r--tools/testfiles/tattr-3.ddl2
-rw-r--r--tools/testfiles/tattr.ddl22
-rw-r--r--tools/testfiles/tattr.h5bin1128 -> 1088 bytes
-rw-r--r--tools/testfiles/tcomp-1.ddl65
-rw-r--r--tools/testfiles/tcomp-2.ddl17
-rw-r--r--tools/testfiles/tcomp-3.ddl38
-rw-r--r--tools/testfiles/tcomp-4.ddl20
-rw-r--r--tools/testfiles/tcompound.h5bin0 -> 5184 bytes
-rw-r--r--tools/testfiles/tdset-1.ddl33
-rw-r--r--tools/testfiles/tdset-2.ddl31
-rw-r--r--tools/testfiles/tdset.ddl17
-rw-r--r--tools/testfiles/tdset.h5bin4672 -> 4672 bytes
-rw-r--r--tools/testfiles/tgroup.ddl33
-rw-r--r--tools/testfiles/thlink-1.ddl27
-rw-r--r--tools/testfiles/thlink-2.ddl18
-rw-r--r--tools/testfiles/thlink-3.ddl18
-rw-r--r--tools/testfiles/thlink-4.ddl19
-rw-r--r--tools/testfiles/thlink-5.ddl20
-rw-r--r--tools/testfiles/thlink.h5bin0 -> 3332 bytes
-rw-r--r--tools/testfiles/tslink-1.ddl4
-rw-r--r--tools/testfiles/tslink-2.ddl2
-rw-r--r--tools/testfiles/tslink.ddl13
-rw-r--r--tools/testfiles/tslink.h5bin1168 -> 1168 bytes
30 files changed, 506 insertions, 187 deletions
diff --git a/tools/testfiles/h5dumptst.c b/tools/testfiles/h5dumptst.c
index 239742a..43be347 100644
--- a/tools/testfiles/h5dumptst.c
+++ b/tools/testfiles/h5dumptst.c
@@ -8,7 +8,8 @@
#define FILE3 "tattr.h5"
#define FILE4 "tslink.h5"
#define FILE5 "thlink.h5"
-#define FILE6 "tall.h5"
+#define FILE6 "tcompound.h5"
+#define FILE7 "tall.h5"
static void test_group(void) {
hid_t fid, group;
@@ -62,9 +63,6 @@ double dset2[30][10];
int i, j;
fid = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* dset2 - compound dt, array ds */
- /* dset3 - named compound dt, array ds */
- /* dset4 - shared dt, array ds */
/* dset1 */
dims[0] = 10; dims[1] = 20;
@@ -83,7 +81,7 @@ int i, j;
dataset = H5Dcreate(fid, "/dset2", H5T_IEEE_F64BE, space, H5P_DEFAULT);
for (i = 0; i < 30; i++)
for (j = 0; j < 10; j++)
- dset2[i][j] = j*1.1 + i;
+ dset2[i][j] = j;
H5Dwrite(dataset, H5T_IEEE_F64BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Sclose(space);
H5Dclose(dataset);
@@ -92,10 +90,6 @@ int i, j;
H5Fclose(fid);
}
-/*
-static void test_nameddt() {
-}
-*/
static void test_attribute(void) {
hid_t fid, root, space, attr;
@@ -118,11 +112,12 @@ double d[10];
H5Sclose(space);
H5Aclose(attr);
+
/* attribute 2 */
- dims[0] = 20;
+ dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (root, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
- for (i = 0; i < 20; i++) data[i] = i+1;
+ for (i = 0; i < 10; i++) data[i] = i+1;
H5Awrite(attr, H5T_STD_I32BE, data);
H5Sclose(space);
H5Aclose(attr);
@@ -131,7 +126,7 @@ double d[10];
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT);
- for (i = 0; i < 10; i++) d[i] = 0.0001 * i+ 0.0001;
+ for (i = 0; i < 10; i++) d[i] = 0.1 * i;
H5Awrite(attr, H5T_IEEE_F64BE, d);
H5Sclose(space);
H5Aclose(attr);
@@ -149,7 +144,7 @@ herr_t status;
root = H5Gopen (fid, "/");
- status = H5Glink (root, H5G_LINK_SOFT, "../../somevalue", "slink1");
+ status = H5Glink (root, H5G_LINK_SOFT, "somevalue", "slink1");
status = H5Glink (root, H5G_LINK_SOFT, "linkvalue", "slink2");
@@ -199,6 +194,143 @@ int i, dset[5];
}
/*
+ /
+ / | \ \
+ dset1 group1 type1 type2
+ |
+ dset2
+
+*/
+static void test_compound_dt(void) { /* test compound data type */
+hid_t fid, group, dataset, space, type;
+typedef struct {
+ int a;
+ float b;
+ double c;
+} dset1_t;
+dset1_t dset1[5];
+
+typedef struct {
+ int a;
+ float b;
+} dset2_t;
+dset2_t dset2[5];
+
+typedef struct {
+ int a[4];
+ float b[5][6];
+} dset3_t;
+
+typedef struct {
+ int a;
+ float b;
+} dset4_t;
+dset4_t dset4[5];
+
+typedef struct {
+ int a;
+ float b;
+} dset5_t;
+dset5_t dset5[5];
+
+int i, ndims;
+const int perm[2];
+size_t dim[2];
+
+hsize_t sdim = 5;
+
+ for (i = 0; i < (int)sdim; i++) {
+ dset1[i].a = i;
+ dset1[i].b = i*i;
+ dset1[i].c = 1./(i+1);
+
+ dset2[i].a = i;
+ dset2[i].b = i+ i*0.1;
+
+ dset4[i].a = i;
+ dset4[i].b = i*1.0;
+
+ dset5[i].a = i;
+ dset5[i].b = i*1.0;
+ }
+
+ fid = H5Fcreate(FILE6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ space = H5Screate_simple(1, &sdim, NULL);
+
+ type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
+
+ H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_STD_I32BE);
+ H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_IEEE_F32BE);
+ H5Tinsert(type, "c_name", HOFFSET(dset1_t, c), H5T_IEEE_F64BE);
+
+ dataset = H5Dcreate(fid, "/dset1", type, space, H5P_DEFAULT);
+ H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
+
+ H5Tclose(type);
+ H5Dclose(dataset);
+
+ /* shared data type 1 */
+ type = H5Tcreate (H5T_COMPOUND, sizeof(dset2_t));
+ H5Tinsert(type, "int_name", HOFFSET(dset2_t, a), H5T_STD_I32BE);
+ H5Tinsert(type, "float_name", HOFFSET(dset2_t, b), H5T_IEEE_F32BE);
+ H5Tcommit(fid, "type1", type);
+
+ group = H5Gcreate (fid, "/group1", 0);
+
+ dataset = H5Dcreate(group, "dset2", type, space, H5P_DEFAULT);
+ H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
+
+ H5Tclose(type);
+ H5Dclose(dataset);
+
+
+ /* shared data type 2 */
+ type = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t));
+ ndims = 1; dim[0] = 4;
+ H5Tinsert_array(type, "int_array", HOFFSET(dset3_t, a), ndims, dim, perm, H5T_STD_I32BE);
+ ndims = 2; dim[0] = 5; dim[1] = 6;
+ H5Tinsert_array(type, "float_array", HOFFSET(dset3_t, b), ndims, dim, perm, H5T_STD_I32BE);
+ H5Tcommit(fid, "type2", type);
+ H5Tclose(type);
+
+ /* shared data type 3 */
+ type = H5Tcreate (H5T_COMPOUND, sizeof(dset4_t));
+ H5Tinsert(type, "int", HOFFSET(dset4_t, a), H5T_STD_I32BE);
+ H5Tinsert(type, "float", HOFFSET(dset4_t, b), H5T_IEEE_F32BE);
+ H5Tcommit(group, "type3", type);
+
+ dataset = H5Dcreate(group, "dset4", type, space, H5P_DEFAULT);
+ H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset4);
+
+ H5Tclose(type);
+ H5Dclose(dataset);
+ H5Gclose(group);
+
+
+ /* unamed data type */
+ group = H5Gcreate (fid, "/group2", 0);
+
+ type = H5Tcreate (H5T_COMPOUND, sizeof(dset5_t));
+ H5Tinsert(type, "int", HOFFSET(dset5_t, a), H5T_STD_I32BE);
+ H5Tinsert(type, "float", HOFFSET(dset5_t, b), H5T_IEEE_F32BE);
+ H5Tcommit(group, "type4", type);
+ dataset = H5Dcreate(group, "dset5", type, space, H5P_DEFAULT);
+ H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset5);
+
+ H5Gunlink(group,"type4");
+
+ H5Tclose(type);
+ H5Dclose(dataset);
+ H5Sclose(space);
+ H5Gclose(group);
+
+ H5Fclose(fid);
+
+}
+
+
+/*
/ : g1 g2 attr1 attr2
g1 : g1.1 g1.2
@@ -217,7 +349,7 @@ char buf[60];
int i, j;
float dset2_1[10], dset2_2[3][5];
- fid = H5Fcreate(FILE6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ fid = H5Fcreate(FILE7, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* create groups */
group = H5Gcreate (fid, "/g1", 0);
@@ -301,7 +433,7 @@ float dset2_1[10], dset2_2[3][5];
/* soft link */
group = H5Gopen (fid, "/g1/g1.2/g1.2.1");
- H5Glink (group, H5G_LINK_SOFT, "../somevalue/.", "slink");
+ H5Glink (group, H5G_LINK_SOFT, "somevalue", "slink");
H5Gclose(group);
group = H5Gopen (fid, "/g2");
@@ -341,9 +473,8 @@ test_attribute();
test_softlink();
test_dataset();
test_hardlink();
+test_compound_dt();
test_all();
return 0;
}
-
-
diff --git a/tools/testfiles/tall-1.ddl b/tools/testfiles/tall-1.ddl
index 8cda1e3..a0d24f8 100644
--- a/tools/testfiles/tall-1.ddl
+++ b/tools/testfiles/tall-1.ddl
@@ -6,40 +6,58 @@ GROUP "/" {
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {"abcdefghi\000"}
+ DATA {
+ "abcdefghi\000"
+ }
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 2, 2 ) ( 2, 2 ) }
- DATA {0,1,2,3}
+ DATA {
+ 0, 1, 2, 3
+ }
}
GROUP "g1" {
GROUP "g1.1" {
DATASET "dset1.1.1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 10 ) ( 10, 10 ) }
- DATA {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9}
+ DATA {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9
+ }
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 27 ) ( 27 ) }
- DATA {"1st attribute of dset1.1.1\000"}
+ DATA {
+ "1st attribute of dset1.1.1\000"
+ }
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 27 ) ( 27 ) }
- DATA {"2nd attribute of dset1.1.1\000"}
+ DATA {
+ "2nd attribute of dset1.1.1\000"
+ }
}
}
DATASET "dset1.1.2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 20 ) ( 20 ) }
- DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
+ DATA {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19
+ }
}
}
GROUP "g1.2" {
GROUP "g1.2.1" {
SOFTLINK "slink" {
- linktarget "../somevalue/."
+ LINKTARGET "somevalue"
}
}
}
@@ -48,12 +66,17 @@ GROUP "/" {
DATASET "dset2.1" {
DATATYPE { "H5T_IEEE_F32BE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9}
+ DATA {
+ 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9
+ }
}
DATASET "dset2.2" {
DATATYPE { "H5T_IEEE_F32BE" }
DATASPACE { ARRAY ( 3, 5 ) ( 3, 5 ) }
- DATA {0,0,0,0,0,0.1,0.1,0.1,0.1,0.1,0.2,0.2,0.2,0.2,0.2}
+ DATA {
+ 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.2,
+ 0.2
+ }
}
}
}
diff --git a/tools/testfiles/tall-3.ddl b/tools/testfiles/tall-3.ddl
index 5c5de6b..a33c8d7 100644
--- a/tools/testfiles/tall-3.ddl
+++ b/tools/testfiles/tall-3.ddl
@@ -5,9 +5,11 @@ HDF5 "tall.h5" {
DATASET "/g2/dset2.1" {
DATATYPE { "H5T_IEEE_F32BE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9}
+ DATA {
+ 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9
+ }
}
SOFTLINK "/g1/g1.2/g1.2.1/slink" {
- linktarget "../somevalue/."
+ LINKTARGET "somevalue"
}
}
diff --git a/tools/testfiles/tall.ddl b/tools/testfiles/tall.ddl
deleted file mode 100644
index 29b7f40..0000000
--- a/tools/testfiles/tall.ddl
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################
-Expected output for '../h5dump tall.h5'
-#############################
-HDF5 "tall.h5" {
-GROUP "/" {
- ATTRIBUTE "attr1" {
- DATATYPE { "H5T_NATIVE_CHAR" }
- DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {"abcdefghi\000"}
- }
- ATTRIBUTE "attr2" {
- DATATYPE { "H5T_NATIVE_INT" }
- DATASPACE { ARRAY ( 2, 2 ) ( 2, 2 ) }
- DATA {0,1,2,3}
- }
- GROUP "g1" {
- GROUP "g1.1" {
- DATASET "dset1.1.1" {
- DATATYPE { "H5T_NATIVE_INT" }
- DATASPACE { ARRAY ( 10, 10 ) ( 10, 10 ) }
- DATA {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9}
- ATTRIBUTE "attr1" {
- DATATYPE { "H5T_NATIVE_CHAR" }
- DATASPACE { ARRAY ( 27 ) ( 27 ) }
- DATA {"1st attribute of dset1.1.1\000"}
- }
- ATTRIBUTE "attr2" {
- DATATYPE { "H5T_NATIVE_CHAR" }
- DATASPACE { ARRAY ( 27 ) ( 27 ) }
- DATA {"2nd attribute of dset1.1.1\000"}
- }
- }
- DATASET "dset1.1.2" {
- DATATYPE { "H5T_NATIVE_INT" }
- DATASPACE { ARRAY ( 20 ) ( 20 ) }
- DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
- }
- }
- GROUP "g1.2" {
- GROUP "g1.2.1" {
- SOFTLINK "slink" {
- linktarget "../somevalue/."
- }
- }
- }
- }
- GROUP "g2" {
- DATASET "dset2.1" {
- DATATYPE { "H5T_NATIVE_FLOAT" }
- DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9}
- }
- DATASET "dset2.2" {
- DATATYPE { "H5T_NATIVE_FLOAT" }
- DATASPACE { ARRAY ( 3, 5 ) ( 3, 5 ) }
- DATA {0,0,0,0,0,0.1,0.1,0.1,0.1,0.1,0.2,0.2,0.2,0.2,0.2}
- }
- }
-}
-}
diff --git a/tools/testfiles/tall.h5 b/tools/testfiles/tall.h5
index 6c3f04d..81a8493 100644
--- a/tools/testfiles/tall.h5
+++ b/tools/testfiles/tall.h5
Binary files differ
diff --git a/tools/testfiles/tattr-1.ddl b/tools/testfiles/tattr-1.ddl
index 27d5aa8..6604aa3 100644
--- a/tools/testfiles/tattr-1.ddl
+++ b/tools/testfiles/tattr-1.ddl
@@ -6,17 +6,23 @@ GROUP "/" {
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 24 ) ( 24 ) }
- DATA {"attribute of root group\000"}
+ DATA {
+ "attribute of root group\000"
+ }
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I32BE" }
- DATASPACE { ARRAY ( 20 ) ( 20 ) }
- DATA {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
+ DATASPACE { ARRAY ( 10 ) ( 10 ) }
+ DATA {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
+ }
}
ATTRIBUTE "attr3" {
DATATYPE { "H5T_IEEE_F64BE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {0.0001,0.0002,0.0003,0.0004,0.0005,0.0006,0.0007,0.0008,0.0009,0.001}
+ DATA {
+ 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9
+ }
}
}
}
diff --git a/tools/testfiles/tattr-2.ddl b/tools/testfiles/tattr-2.ddl
index 2c39ae2..ccccb8d 100644
--- a/tools/testfiles/tattr-2.ddl
+++ b/tools/testfiles/tattr-2.ddl
@@ -5,11 +5,15 @@ HDF5 "tattr.h5" {
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 24 ) ( 24 ) }
- DATA {"attribute of root group\000"}
+ DATA {
+ "attribute of root group\000"
+ }
}
ATTRIBUTE "attr3" {
DATATYPE { "H5T_IEEE_F64BE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {0.0001,0.0002,0.0003,0.0004,0.0005,0.0006,0.0007,0.0008,0.0009,0.001}
+ DATA {
+ 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9
+ }
}
}
diff --git a/tools/testfiles/tattr-3.ddl b/tools/testfiles/tattr-3.ddl
index 14c04cd..42a133b 100644
--- a/tools/testfiles/tattr-3.ddl
+++ b/tools/testfiles/tattr-3.ddl
@@ -4,6 +4,6 @@ Expected output for '../h5dump -header -a attr2 tattr.h5'
HDF5 "tattr.h5" {
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I32BE" }
- DATASPACE { ARRAY ( 20 ) ( 20 ) }
+ DATASPACE { ARRAY ( 10 ) ( 10 ) }
}
}
diff --git a/tools/testfiles/tattr.ddl b/tools/testfiles/tattr.ddl
deleted file mode 100644
index ddde121..0000000
--- a/tools/testfiles/tattr.ddl
+++ /dev/null
@@ -1,22 +0,0 @@
-#############################
-Expected output for '../h5dump tattr.h5'
-#############################
-HDF5 "tattr.h5" {
-GROUP "/" {
- ATTRIBUTE "attr1" {
- DATATYPE { "H5T_NATIVE_CHAR" }
- DATASPACE { ARRAY ( 24 ) ( 24 ) }
- DATA {"attribute of root group\000"}
- }
- ATTRIBUTE "attr2" {
- DATATYPE { "H5T_NATIVE_INT" }
- DATASPACE { ARRAY ( 20 ) ( 20 ) }
- DATA {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
- }
- ATTRIBUTE "attr3" {
- DATATYPE { "H5T_NATIVE_DOUBLE" }
- DATASPACE { ARRAY ( 10 ) ( 10 ) }
- DATA {0.0001,0.0002,0.0003,0.0004,0.0005,0.0006,0.0007,0.0008,0.0009,0.001}
- }
-}
-}
diff --git a/tools/testfiles/tattr.h5 b/tools/testfiles/tattr.h5
index f99974c..a75bb52 100644
--- a/tools/testfiles/tattr.h5
+++ b/tools/testfiles/tattr.h5
Binary files differ
diff --git a/tools/testfiles/tcomp-1.ddl b/tools/testfiles/tcomp-1.ddl
new file mode 100644
index 0000000..172eb3e
--- /dev/null
+++ b/tools/testfiles/tcomp-1.ddl
@@ -0,0 +1,65 @@
+#############################
+Expected output for '../h5dump tcompound.h5'
+#############################
+HDF5 "tcompound.h5" {
+GROUP "/" {
+ DATATYPE "#3432:0" {
+ H5T_STD_I32BE int;
+ H5T_IEEE_F32BE float;
+ }
+ DATASET "dset1" {
+ DATATYPE {
+ H5T_STD_I32BE a_name;
+ H5T_IEEE_F32BE b_name;
+ H5T_IEEE_F64BE c_name;
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0,1}, {1,1,0.5}, {2,4,0.333333}, {3,9,0.25}, {4,16,0.2}
+ }
+ }
+ GROUP "group1" {
+ DATASET "dset2" {
+ DATATYPE {
+ HARDLINK { "/type1" }
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0}, {1,1.1}, {2,2.2}, {3,3.3}, {4,4.4}
+ }
+ }
+ DATASET "dset4" {
+ DATATYPE {
+ HARDLINK { "/group1/type3" }
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0}, {1,1}, {2,2}, {3,3}, {4,4}
+ }
+ }
+ DATATYPE "type3" {
+ H5T_STD_I32BE int;
+ H5T_IEEE_F32BE float;
+ }
+ }
+ GROUP "group2" {
+ DATASET "dset5" {
+ DATATYPE {
+ HARDLINK { "#3432:0" }
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0}, {1,1}, {2,2}, {3,3}, {4,4}
+ }
+ }
+ }
+ DATATYPE "type1" {
+ H5T_STD_I32BE int_name;
+ H5T_IEEE_F32BE float_name;
+ }
+ DATATYPE "type2" {
+ H5T_STD_I32BE int_array[4];
+ H5T_STD_I32BE float_array[5][6];
+ }
+}
+}
diff --git a/tools/testfiles/tcomp-2.ddl b/tools/testfiles/tcomp-2.ddl
new file mode 100644
index 0000000..cbd3bbe
--- /dev/null
+++ b/tools/testfiles/tcomp-2.ddl
@@ -0,0 +1,17 @@
+#############################
+Expected output for '../h5dump -t /type1 /type2 /group1/type3 tcompound.h5'
+#############################
+HDF5 "tcompound.h5" {
+DATATYPE "/type1" {
+ H5T_STD_I32BE int_name;
+ H5T_IEEE_F32BE float_name;
+}
+DATATYPE "/type2" {
+ H5T_STD_I32BE int_array[4];
+ H5T_STD_I32BE float_array[5][6];
+}
+DATATYPE "/group1/type3" {
+ H5T_STD_I32BE int;
+ H5T_IEEE_F32BE float;
+}
+}
diff --git a/tools/testfiles/tcomp-3.ddl b/tools/testfiles/tcomp-3.ddl
new file mode 100644
index 0000000..20a3661
--- /dev/null
+++ b/tools/testfiles/tcomp-3.ddl
@@ -0,0 +1,38 @@
+#############################
+Expected output for '../h5dump -d /group2/dset5 -g /group1 tcompound.h5'
+#############################
+HDF5 "tcompound.h5" {
+DATASET "/group2/dset5" {
+ DATATYPE {
+ HARDLINK { "#3432:0" }
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0}, {1,1}, {2,2}, {3,3}, {4,4}
+ }
+}
+GROUP "/group1" {
+ DATASET "dset2" {
+ DATATYPE {
+ HARDLINK { "/type1" }
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0}, {1,1.1}, {2,2.2}, {3,3.3}, {4,4.4}
+ }
+ }
+ DATASET "dset4" {
+ DATATYPE {
+ HARDLINK { "/group1/type3" }
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0}, {1,1}, {2,2}, {3,3}, {4,4}
+ }
+ }
+ DATATYPE "type3" {
+ H5T_STD_I32BE int;
+ H5T_IEEE_F32BE float;
+ }
+}
+}
diff --git a/tools/testfiles/tcomp-4.ddl b/tools/testfiles/tcomp-4.ddl
new file mode 100644
index 0000000..2510c43
--- /dev/null
+++ b/tools/testfiles/tcomp-4.ddl
@@ -0,0 +1,20 @@
+#############################
+Expected output for '../h5dump -t /#3432:0 -g /group2 tcompound.h5'
+#############################
+HDF5 "tcompound.h5" {
+DATATYPE "/#3432:0" {
+ H5T_STD_I32BE int;
+ H5T_IEEE_F32BE float;
+}
+GROUP "/group2" {
+ DATASET "dset5" {
+ DATATYPE {
+ HARDLINK { "#3432:0" }
+ }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ {0,0}, {1,1}, {2,2}, {3,3}, {4,4}
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tcompound.h5 b/tools/testfiles/tcompound.h5
new file mode 100644
index 0000000..19e4b8c
--- /dev/null
+++ b/tools/testfiles/tcompound.h5
Binary files differ
diff --git a/tools/testfiles/tdset-1.ddl b/tools/testfiles/tdset-1.ddl
index aa56554..b1757db 100644
--- a/tools/testfiles/tdset-1.ddl
+++ b/tools/testfiles/tdset-1.ddl
@@ -6,12 +6,41 @@ GROUP "/" {
DATASET "dset1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 20 ) ( 10, 20 ) }
- DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
+ DATA {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19
+ }
}
DATASET "dset2" {
DATATYPE { "H5T_IEEE_F64BE" }
DATASPACE { ARRAY ( 30, 10 ) ( 30, 10 ) }
- DATA {0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,1,2.1,3.2,4.3,5.4,6.5,7.6,8.7,9.8,10.9,2,3.1,4.2,5.3,6.4,7.5,8.6,9.7,10.8,11.9,3,4.1,5.2,6.3,7.4,8.5,9.6,10.7,11.8,12.9,4,5.1,6.2,7.3,8.4,9.5,10.6,11.7,12.8,13.9,5,6.1,7.2,8.3,9.4,10.5,11.6,12.7,13.8,14.9,6,7.1,8.2,9.3,10.4,11.5,12.6,13.7,14.8,15.9,7,8.1,9.2,10.3,11.4,12.5,13.6,14.7,15.8,16.9,8,9.1,10.2,11.3,12.4,13.5,14.6,15.7,16.8,17.9,9,10.1,11.2,12.3,13.4,14.5,15.6,16.7,17.8,18.9,10,11.1,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,11,12.1,13.2,14.3,15.4,16.5,17.6,18.7,19.8,20.9,12,13.1,14.2,15.3,16.4,17.5,18.6,19.7,20.8,21.9,13,14.1,15.2,16.3,17.4,18.5,19.6,20.7,21.8,22.9,14,15.1,16.2,17.3,18.4,19.5,20.6,21.7,22.8,23.9,15,16.1,17.2,18.3,19.4,20.5,21.6,22.7,23.8,24.9,16,17.1,18.2,19.3,20.4,21.5,22.6,23.7,24.8,25.9,17,18.1,19.2,20.3,21.4,22.5,23.6,24.7,25.8,26.9,18,19.1,20.2,21.3,22.4,23.5,24.6,25.7,26.8,27.9,19,20.1,21.2,22.3,23.4,24.5,25.6,26.7,27.8,28.9,20,21.1,22.2,23.3,24.4,25.5,26.6,27.7,28.8,29.9,21,22.1,23.2,24.3,25.4,26.5,27.6,28.7,29.8,30.9,22,23.1,24.2,25.3,26.4,27.5,28.6,29.7,30.8,31.9,23,24.1,25.2,26.3,27.4,28.5,29.6,30.7,31.8,32.9,24,25.1,26.2,27.3,28.4,29.5,30.6,31.7,32.8,33.9,25,26.1,27.2,28.3,29.4,30.5,31.6,32.7,33.8,34.9,26,27.1,28.2,29.3,30.4,31.5,32.6,33.7,34.8,35.9,27,28.1,29.2,30.3,31.4,32.5,33.6,34.7,35.8,36.9,28,29.1,30.2,31.3,32.4,33.5,34.6,35.7,36.8,37.9,29,30.1,31.2,32.3,33.4,34.5,35.6,36.7,37.8,38.9}
+ DATA {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9
+ }
}
}
}
diff --git a/tools/testfiles/tdset-2.ddl b/tools/testfiles/tdset-2.ddl
index 2ec760d..e876103 100644
--- a/tools/testfiles/tdset-2.ddl
+++ b/tools/testfiles/tdset-2.ddl
@@ -5,11 +5,38 @@ HDF5 "tdset.h5" {
DATASET "dset1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 20 ) ( 10, 20 ) }
- DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
+ DATA {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
+ }
}
DATASET "/dset2" {
DATATYPE { "H5T_IEEE_F64BE" }
DATASPACE { ARRAY ( 30, 10 ) ( 30, 10 ) }
- DATA {0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,1,2.1,3.2,4.3,5.4,6.5,7.6,8.7,9.8,10.9,2,3.1,4.2,5.3,6.4,7.5,8.6,9.7,10.8,11.9,3,4.1,5.2,6.3,7.4,8.5,9.6,10.7,11.8,12.9,4,5.1,6.2,7.3,8.4,9.5,10.6,11.7,12.8,13.9,5,6.1,7.2,8.3,9.4,10.5,11.6,12.7,13.8,14.9,6,7.1,8.2,9.3,10.4,11.5,12.6,13.7,14.8,15.9,7,8.1,9.2,10.3,11.4,12.5,13.6,14.7,15.8,16.9,8,9.1,10.2,11.3,12.4,13.5,14.6,15.7,16.8,17.9,9,10.1,11.2,12.3,13.4,14.5,15.6,16.7,17.8,18.9,10,11.1,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,11,12.1,13.2,14.3,15.4,16.5,17.6,18.7,19.8,20.9,12,13.1,14.2,15.3,16.4,17.5,18.6,19.7,20.8,21.9,13,14.1,15.2,16.3,17.4,18.5,19.6,20.7,21.8,22.9,14,15.1,16.2,17.3,18.4,19.5,20.6,21.7,22.8,23.9,15,16.1,17.2,18.3,19.4,20.5,21.6,22.7,23.8,24.9,16,17.1,18.2,19.3,20.4,21.5,22.6,23.7,24.8,25.9,17,18.1,19.2,20.3,21.4,22.5,23.6,24.7,25.8,26.9,18,19.1,20.2,21.3,22.4,23.5,24.6,25.7,26.8,27.9,19,20.1,21.2,22.3,23.4,24.5,25.6,26.7,27.8,28.9,20,21.1,22.2,23.3,24.4,25.5,26.6,27.7,28.8,29.9,21,22.1,23.2,24.3,25.4,26.5,27.6,28.7,29.8,30.9,22,23.1,24.2,25.3,26.4,27.5,28.6,29.7,30.8,31.9,23,24.1,25.2,26.3,27.4,28.5,29.6,30.7,31.8,32.9,24,25.1,26.2,27.3,28.4,29.5,30.6,31.7,32.8,33.9,25,26.1,27.2,28.3,29.4,30.5,31.6,32.7,33.8,34.9,26,27.1,28.2,29.3,30.4,31.5,32.6,33.7,34.8,35.9,27,28.1,29.2,30.3,31.4,32.5,33.6,34.7,35.8,36.9,28,29.1,30.2,31.3,32.4,33.5,34.6,35.7,36.8,37.9,29,30.1,31.2,32.3,33.4,34.5,35.6,36.7,37.8,38.9}
+ DATA {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
+ }
}
}
diff --git a/tools/testfiles/tdset.ddl b/tools/testfiles/tdset.ddl
deleted file mode 100644
index 5146694..0000000
--- a/tools/testfiles/tdset.ddl
+++ /dev/null
@@ -1,17 +0,0 @@
-#############################
-Expected output for '../h5dump tdset.h5'
-#############################
-HDF5 "tdset.h5" {
-GROUP "/" {
- DATASET "dset1" {
- DATATYPE { "H5T_NATIVE_INT" }
- DATASPACE { ARRAY ( 10, 20 ) ( 10, 20 ) }
- DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
- }
- DATASET "dset2" {
- DATATYPE { "H5T_NATIVE_DOUBLE" }
- DATASPACE { ARRAY ( 30, 10 ) ( 30, 10 ) }
- DATA {0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,1,2.1,3.2,4.3,5.4,6.5,7.6,8.7,9.8,10.9,2,3.1,4.2,5.3,6.4,7.5,8.6,9.7,10.8,11.9,3,4.1,5.2,6.3,7.4,8.5,9.6,10.7,11.8,12.9,4,5.1,6.2,7.3,8.4,9.5,10.6,11.7,12.8,13.9,5,6.1,7.2,8.3,9.4,10.5,11.6,12.7,13.8,14.9,6,7.1,8.2,9.3,10.4,11.5,12.6,13.7,14.8,15.9,7,8.1,9.2,10.3,11.4,12.5,13.6,14.7,15.8,16.9,8,9.1,10.2,11.3,12.4,13.5,14.6,15.7,16.8,17.9,9,10.1,11.2,12.3,13.4,14.5,15.6,16.7,17.8,18.9,10,11.1,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,11,12.1,13.2,14.3,15.4,16.5,17.6,18.7,19.8,20.9,12,13.1,14.2,15.3,16.4,17.5,18.6,19.7,20.8,21.9,13,14.1,15.2,16.3,17.4,18.5,19.6,20.7,21.8,22.9,14,15.1,16.2,17.3,18.4,19.5,20.6,21.7,22.8,23.9,15,16.1,17.2,18.3,19.4,20.5,21.6,22.7,23.8,24.9,16,17.1,18.2,19.3,20.4,21.5,22.6,23.7,24.8,25.9,17,18.1,19.2,20.3,21.4,22.5,23.6,24.7,25.8,26.9,18,19.1,20.2,21.3,22.4,23.5,24.6,25.7,26.8,27.9,19,20.1,21.2,22.3,23.4,24.5,25.6,26.7,27.8,28.9,20,21.1,22.2,23.3,24.4,25.5,26.6,27.7,28.8,29.9,21,22.1,23.2,24.3,25.4,26.5,27.6,28.7,29.8,30.9,22,23.1,24.2,25.3,26.4,27.5,28.6,29.7,30.8,31.9,23,24.1,25.2,26.3,27.4,28.5,29.6,30.7,31.8,32.9,24,25.1,26.2,27.3,28.4,29.5,30.6,31.7,32.8,33.9,25,26.1,27.2,28.3,29.4,30.5,31.6,32.7,33.8,34.9,26,27.1,28.2,29.3,30.4,31.5,32.6,33.7,34.8,35.9,27,28.1,29.2,30.3,31.4,32.5,33.6,34.7,35.8,36.9,28,29.1,30.2,31.3,32.4,33.5,34.6,35.7,36.8,37.9,29,30.1,31.2,32.3,33.4,34.5,35.6,36.7,37.8,38.9}
- }
-}
-}
diff --git a/tools/testfiles/tdset.h5 b/tools/testfiles/tdset.h5
index 7cac56d..16c17f2 100644
--- a/tools/testfiles/tdset.h5
+++ b/tools/testfiles/tdset.h5
Binary files differ
diff --git a/tools/testfiles/tgroup.ddl b/tools/testfiles/tgroup.ddl
deleted file mode 100644
index a671b8e..0000000
--- a/tools/testfiles/tgroup.ddl
+++ /dev/null
@@ -1,33 +0,0 @@
-#############################
-Expected output for '../h5dump tgroup.h5'
-#############################
-HDF5 "tgroup.h5" {
-GROUP "/" {
- GROUP "g1" {
- GROUP "g1.1" {
- }
- GROUP "g1.2" {
- }
- }
- GROUP "g2" {
- GROUP "g2.1" {
- GROUP "g2.1.1" {
- }
- GROUP "g2.1.2" {
- }
- GROUP "g2.1.3" {
- }
- }
- }
- GROUP "g3" {
- GROUP "g3.1" {
- }
- GROUP "g3.2" {
- }
- GROUP "g3.3" {
- }
- GROUP "g3.4" {
- }
- }
-}
-}
diff --git a/tools/testfiles/thlink-1.ddl b/tools/testfiles/thlink-1.ddl
new file mode 100644
index 0000000..670f19f
--- /dev/null
+++ b/tools/testfiles/thlink-1.ddl
@@ -0,0 +1,27 @@
+#############################
+Expected output for '../h5dump thlink.h5'
+#############################
+HDF5 "thlink.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE { "H5T_STD_I32BE" }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ 0, 1, 2, 3, 4
+ }
+ }
+ GROUP "g1" {
+ GROUP "link1" {
+ DATASET "link3" {
+ HARDLINK { "/dset" }
+ }
+ }
+ DATASET "link2" {
+ HARDLINK { "/dset" }
+ }
+ }
+ GROUP "g2" {
+ HARDLINK { "/g1/link1" }
+ }
+}
+}
diff --git a/tools/testfiles/thlink-2.ddl b/tools/testfiles/thlink-2.ddl
new file mode 100644
index 0000000..df2b6ab
--- /dev/null
+++ b/tools/testfiles/thlink-2.ddl
@@ -0,0 +1,18 @@
+#############################
+Expected output for '../h5dump -d /g1/link2 /dset /g1/link1/link3 thlink.h5'
+#############################
+HDF5 "thlink.h5" {
+DATASET "/g1/link2" {
+ DATATYPE { "H5T_STD_I32BE" }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ 0, 1, 2, 3, 4
+ }
+}
+DATASET "/dset" {
+ HARDLINK { "/g1/link2" }
+}
+DATASET "/g1/link1/link3" {
+ HARDLINK { "/g1/link2" }
+}
+}
diff --git a/tools/testfiles/thlink-3.ddl b/tools/testfiles/thlink-3.ddl
new file mode 100644
index 0000000..7658c2e
--- /dev/null
+++ b/tools/testfiles/thlink-3.ddl
@@ -0,0 +1,18 @@
+#############################
+Expected output for '../h5dump -d /dset /g1/link1/link3 /g1/link2 thlink.h5'
+#############################
+HDF5 "thlink.h5" {
+DATASET "/dset" {
+ DATATYPE { "H5T_STD_I32BE" }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ 0, 1, 2, 3, 4
+ }
+}
+DATASET "/g1/link1/link3" {
+ HARDLINK { "/dset" }
+}
+DATASET "/g1/link2" {
+ HARDLINK { "/dset" }
+}
+}
diff --git a/tools/testfiles/thlink-4.ddl b/tools/testfiles/thlink-4.ddl
new file mode 100644
index 0000000..5579fdb
--- /dev/null
+++ b/tools/testfiles/thlink-4.ddl
@@ -0,0 +1,19 @@
+#############################
+Expected output for '../h5dump -g /g1 thlink.h5'
+#############################
+HDF5 "thlink.h5" {
+GROUP "/g1" {
+ GROUP "link1" {
+ DATASET "link3" {
+ DATATYPE { "H5T_STD_I32BE" }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ 0, 1, 2, 3, 4
+ }
+ }
+ }
+ DATASET "link2" {
+ HARDLINK { "/g1/link1/link3" }
+ }
+}
+}
diff --git a/tools/testfiles/thlink-5.ddl b/tools/testfiles/thlink-5.ddl
new file mode 100644
index 0000000..dc636d7
--- /dev/null
+++ b/tools/testfiles/thlink-5.ddl
@@ -0,0 +1,20 @@
+#############################
+Expected output for '../h5dump -d /dset -g /g2 -d /g1/link2 thlink.h5'
+#############################
+HDF5 "thlink.h5" {
+DATASET "/dset" {
+ DATATYPE { "H5T_STD_I32BE" }
+ DATASPACE { ARRAY ( 5 ) ( 5 ) }
+ DATA {
+ 0, 1, 2, 3, 4
+ }
+}
+GROUP "/g2" {
+ DATASET "link3" {
+ HARDLINK { "/dset" }
+ }
+}
+DATASET "/g1/link2" {
+ HARDLINK { "/dset" }
+}
+}
diff --git a/tools/testfiles/thlink.h5 b/tools/testfiles/thlink.h5
new file mode 100644
index 0000000..8419785
--- /dev/null
+++ b/tools/testfiles/thlink.h5
Binary files differ
diff --git a/tools/testfiles/tslink-1.ddl b/tools/testfiles/tslink-1.ddl
index 0a1a468..10affa0 100644
--- a/tools/testfiles/tslink-1.ddl
+++ b/tools/testfiles/tslink-1.ddl
@@ -4,10 +4,10 @@ Expected output for '../h5dump tslink.h5'
HDF5 "tslink.h5" {
GROUP "/" {
SOFTLINK "slink1" {
- linktarget "../../somevalue"
+ LINKTARGET "somevalue"
}
SOFTLINK "slink2" {
- linktarget "linkvalue"
+ LINKTARGET "linkvalue"
}
}
}
diff --git a/tools/testfiles/tslink-2.ddl b/tools/testfiles/tslink-2.ddl
index 310f8d2..aa84e15 100644
--- a/tools/testfiles/tslink-2.ddl
+++ b/tools/testfiles/tslink-2.ddl
@@ -3,6 +3,6 @@ Expected output for '../h5dump -l slink2 tslink.h5'
#############################
HDF5 "tslink.h5" {
SOFTLINK "slink2" {
- linktarget "linkvalue"
+ LINKTARGET "linkvalue"
}
}
diff --git a/tools/testfiles/tslink.ddl b/tools/testfiles/tslink.ddl
deleted file mode 100644
index 0a1a468..0000000
--- a/tools/testfiles/tslink.ddl
+++ /dev/null
@@ -1,13 +0,0 @@
-#############################
-Expected output for '../h5dump tslink.h5'
-#############################
-HDF5 "tslink.h5" {
-GROUP "/" {
- SOFTLINK "slink1" {
- linktarget "../../somevalue"
- }
- SOFTLINK "slink2" {
- linktarget "linkvalue"
- }
-}
-}
diff --git a/tools/testfiles/tslink.h5 b/tools/testfiles/tslink.h5
index 8e2ce0d..c6b1b2d 100644
--- a/tools/testfiles/tslink.h5
+++ b/tools/testfiles/tslink.h5
Binary files differ