summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-01-15 16:42:13 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-01-15 16:42:13 (GMT)
commitc4d9f6ae104e886d7dc6c69567d661989b662e5c (patch)
tree01c796320d720ba6d461609091fb7b17af248807 /tools
parent7f7fbb47183b6d6a95da4071acb2f8fff1e51c0b (diff)
downloadhdf5-c4d9f6ae104e886d7dc6c69567d661989b662e5c.zip
hdf5-c4d9f6ae104e886d7dc6c69567d661989b662e5c.tar.gz
hdf5-c4d9f6ae104e886d7dc6c69567d661989b662e5c.tar.bz2
[svn-r8066] Purpose: bug fix
Description: h5dump and h5ls failed an assertion check when a dataset's datatype is enumerate type and there are special characters in the names of these values. Platforms tested: h5committest
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dumpgentest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 901f427..8eb50e1 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -1479,13 +1479,13 @@ static void gent_enum(void)
file = H5Fcreate(FILE15,H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
+ /* Try to test names with special characters */
type = H5Tcreate(H5T_ENUM, sizeof(enumtype));
H5Tenum_insert(type, "RED", (val = 0, &val));
- H5Tenum_insert(type, "GREEN", (val = 1, &val));
- H5Tenum_insert(type, "BLUE", (val = 2, &val));
- H5Tenum_insert(type, "WHITE", (val = 3, &val));
- H5Tenum_insert(type, "BLACK", (val = 4, &val));
+ H5Tenum_insert(type, "GREEN\ngreen", (val = 1, &val));
+ H5Tenum_insert(type, "BLUE blue", (val = 2, &val));
+ H5Tenum_insert(type, "WHITE \"white\"", (val = 3, &val));
+ H5Tenum_insert(type, "BLACK \'black\'", (val = 4, &val));
H5Tcommit(file, "enum normal", type);
space = H5Screate_simple(1,size,NULL);