diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-16 18:41:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-16 18:41:26 (GMT) |
commit | de1af0c1c706c04ac19abcdd773d91127b81abd8 (patch) | |
tree | d51adaa29bbcb9b3d607202fa0dad9d5f9244bcd /test/links.c | |
parent | d3bd0649ed34c91f2cd2cdca61a29c6cc9a7575a (diff) | |
download | hdf5-de1af0c1c706c04ac19abcdd773d91127b81abd8.zip hdf5-de1af0c1c706c04ac19abcdd773d91127b81abd8.tar.gz hdf5-de1af0c1c706c04ac19abcdd773d91127b81abd8.tar.bz2 |
[svn-r13520] Description:
Added H5Lexists() API routine, which determines if a link of a particular
name exists in a group.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'test/links.c')
-rw-r--r-- | test/links.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/links.c b/test/links.c index eb7b596..ff6a8b8 100644 --- a/test/links.c +++ b/test/links.c @@ -310,6 +310,8 @@ cklinks(hid_t fapl, hbool_t new_format) puts(" expected file location."); TEST_ERROR } + if(H5Lexists(file, "d1", H5P_DEFAULT) != TRUE) TEST_ERROR + if(H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE) TEST_ERROR /* Symbolic link */ if (H5Gget_objinfo(file, "grp1/soft", TRUE, &sb2) < 0) TEST_ERROR @@ -330,6 +332,7 @@ cklinks(hid_t fapl, hbool_t new_format) puts(" Soft link test failed. Wrong link value"); TEST_ERROR } + if(H5Lexists(file, "grp1/soft", H5P_DEFAULT) != TRUE) TEST_ERROR /* Dangling link */ H5E_BEGIN_TRY { @@ -356,6 +359,7 @@ cklinks(hid_t fapl, hbool_t new_format) puts(" Dangling link test failed. Wrong link value"); TEST_ERROR } + if(H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != TRUE) TEST_ERROR /* Recursive link */ H5E_BEGIN_TRY { @@ -383,6 +387,9 @@ cklinks(hid_t fapl, hbool_t new_format) TEST_ERROR } + /* Non-existant link */ + if(H5Lexists(file, "foobar", H5P_DEFAULT) == TRUE) TEST_ERROR + /* Cleanup */ if (H5Fclose(file) < 0) TEST_ERROR PASSED(); |