summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2004-07-20 00:47:37 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2004-07-20 00:47:37 (GMT)
commit24d36e1613a38a6d99e9c81ecd6d83063aec11b3 (patch)
tree34ea787b798eba19cbf488ba377ac624293606a4 /test
parent4e13d7afd521a9775f5888a960f273fbc695b4a1 (diff)
downloadhdf5-24d36e1613a38a6d99e9c81ecd6d83063aec11b3.zip
hdf5-24d36e1613a38a6d99e9c81ecd6d83063aec11b3.tar.gz
hdf5-24d36e1613a38a6d99e9c81ecd6d83063aec11b3.tar.bz2
[svn-r8897]
Purpose: Bug Fix Description: Trying to create the root group or the working group ("/" or ".") fakes out HDF5 so that it neither creates a group nor returns an error. Solution: H5G_namei now throws an error if it was supposed to insert but didn't. Platforms tested: sleipnir, Visual Studio 7 (very minor change) Misc. update:
Diffstat (limited to 'test')
-rw-r--r--test/stab.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/stab.c b/test/stab.c
index 1c43760..68c7630 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -81,6 +81,17 @@ test_misc(hid_t file)
if (H5Gclose(g2)<0) goto error;
if (H5Gclose(g3)<0) goto error;
+ /* Check that creating groups with no-op names isn't allowed */
+ H5E_BEGIN_TRY {
+ g1=H5Gcreate(file, "/", 0);
+ } H5E_END_TRY
+ if(g1 >= 0) goto error;
+
+ H5E_BEGIN_TRY {
+ g1=H5Gcreate(file, "./././", 0);
+ } H5E_END_TRY
+ if(g1 >= 0) goto error;
+
PASSED();
return 0;