summaryrefslogtreecommitdiffstats
path: root/tools/h5ls/testh5ls.sh.in
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-07-07 20:06:20 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-07-07 20:06:20 (GMT)
commit435f58c1b8bc3002cb23bfa935dc9c3cc5a8d68a (patch)
tree142060b1fc2822a7e9d15fba2726ddd1c5337f55 /tools/h5ls/testh5ls.sh.in
parent68484a2099fd18e895bb7e097cf42127ca3550d2 (diff)
downloadhdf5-435f58c1b8bc3002cb23bfa935dc9c3cc5a8d68a.zip
hdf5-435f58c1b8bc3002cb23bfa935dc9c3cc5a8d68a.tar.gz
hdf5-435f58c1b8bc3002cb23bfa935dc9c3cc5a8d68a.tar.bz2
[svn-r19053] Purpose:
Add --no-dangling-links option to h5ls. Description: Related to "Bug 1830 - Following an dangling external link in h5ls should set non-zero return code." If --no-dangling-links option is specified and any dangling link is found, return exit code 1 (error). Merged from hdf5 trunk r19051 Tested: jam, amani, heiwa
Diffstat (limited to 'tools/h5ls/testh5ls.sh.in')
-rw-r--r--tools/h5ls/testh5ls.sh.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/h5ls/testh5ls.sh.in b/tools/h5ls/testh5ls.sh.in
index 7f07898..642241f 100644
--- a/tools/h5ls/testh5ls.sh.in
+++ b/tools/h5ls/testh5ls.sh.in
@@ -167,6 +167,18 @@ TOOLTEST textlinksrc-3-old.ls 0 -w80 -Er textlinksrc.h5/ext_link1
TOOLTEST textlinksrc-6-old.ls 0 -w80 -E textlinksrc.h5
TOOLTEST textlinksrc-7-old.ls 0 -w80 -E textlinksrc.h5/ext_link1
+# tests for no-dangling-links
+# if this option is given on dangling link, h5ls should return exit code 1
+# when used alone , expect to print out help and return exit code 1
+TOOLTEST textlinksrc-nodangle-1.ls 1 -w80 --no-dangling-links textlinksrc.h5
+# external dangling link - expected exit code 1
+TOOLTEST textlinksrc-nodangle-2.ls 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5
+# soft dangling link - expected exit code 1
+TOOLTEST tsoftlinks-nodangle-1.ls 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5
+# when used file with no dangling links - expected exit code 0
+TOOLTEST thlinks-nodangle-1.ls 0 -w80 --follow-symlinks --no-dangling-links thlink.h5
+
+
# tests for hard links
TOOLTEST thlink-1.ls 0 -w80 thlink.h5