From cce17a2274de2afe51e9dfab8c810bc3439187e9 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 3 Aug 2006 22:59:24 -0500 Subject: [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. --- tools/h5ls/testh5ls.sh | 4 ++++ tools/testfiles/nosuchfile.ls | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 tools/testfiles/nosuchfile.ls 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 -- cgit v0.12