summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-08-04 03:59:24 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-08-04 03:59:24 (GMT)
commitcce17a2274de2afe51e9dfab8c810bc3439187e9 (patch)
treedf1618892b3f2646afb8ddef35220291b9536c54
parent104edc6fb9ef82a3015e7d9bb10fa61d9cadcf0d (diff)
downloadhdf5-cce17a2274de2afe51e9dfab8c810bc3439187e9.zip
hdf5-cce17a2274de2afe51e9dfab8c810bc3439187e9.tar.gz
hdf5-cce17a2274de2afe51e9dfab8c810bc3439187e9.tar.bz2
[svn-r12535] Added a new test for testing error handling of non-existing file.
nosuchfile.ls is the expected output. Tested: tg-ncsa and heping.
-rwxr-xr-xtools/h5ls/testh5ls.sh4
-rw-r--r--tools/testfiles/nosuchfile.ls4
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/h5ls/testh5ls.sh b/tools/h5ls/testh5ls.sh
index c9aa901..40fcc53 100755
--- a/tools/h5ls/testh5ls.sh
+++ b/tools/h5ls/testh5ls.sh
@@ -153,6 +153,10 @@ TOOLTEST tempty.ls -w80 -d tempty.h5
# enable -S for avoiding printing NATIVE types
TOOLTEST tattr2.ls -w80 -v -S tattr2.h5
+# tests for error handling.
+# test for non-existing file
+TOOLTEST nosuchfile.ls nosuchfile.h5
+
if test $nerrors -eq 0 ; then
echo "All h5ls tests passed."
fi
diff --git a/tools/testfiles/nosuchfile.ls b/tools/testfiles/nosuchfile.ls
new file mode 100644
index 0000000..8d5855e
--- /dev/null
+++ b/tools/testfiles/nosuchfile.ls
@@ -0,0 +1,4 @@
+#############################
+ output for 'h5ls nosuchfile.h5'
+#############################
+nosuchfile.h5: unable to open file