From 3bd39f60e05d1c3ec3e0e7d5e1c14b171156f14b Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Fri, 4 Apr 2003 14:42:26 -0500 Subject: [svn-r6588] Purpose: added more tests to automatic testing Description: added test for an invalid option letter added test for -h option added test for an invalid option -d added test for an invalid option -d number Solution: Platforms tested: linux, solaris, sgi Misc. update: --- tools/h5diff/testh5diff.sh | 13 +++++++++++++ tools/testfiles/h5diff_2.txt | 18 ++++++++++++++++++ tools/testfiles/h5diff_3.txt | 17 +++++++++++++++++ tools/testfiles/h5diff_4.txt | 18 ++++++++++++++++++ tools/testfiles/h5diff_5.txt | 18 ++++++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 tools/testfiles/h5diff_2.txt create mode 100644 tools/testfiles/h5diff_3.txt create mode 100644 tools/testfiles/h5diff_4.txt create mode 100644 tools/testfiles/h5diff_5.txt diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 579455d..6ffac1d 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -96,6 +96,19 @@ TOOLTEST h5diff_1.txt h5diff_test1.h5 # test2: Check for invalid options TOOLTEST h5diff_2.txt -x h5diff_test1.h5 h5diff_test2.h5 +# test3: Check for -h option +TOOLTEST h5diff_3.txt -h h5diff_test1.h5 h5diff_test2.h5 + +# test4: Check for invalid -d options +TOOLTEST h5diff_4.txt -d h5diff_test1.h5 h5diff_test2.h5 + +# test5: Check for invalid -d options +TOOLTEST h5diff_5.txt -d -4 h5diff_test1.h5 h5diff_test2.h5 + + + + + if test $nerrors -eq 0 ; then echo "All $H5DIFF tests passed." fi diff --git a/tools/testfiles/h5diff_2.txt b/tools/testfiles/h5diff_2.txt new file mode 100644 index 0000000..1a55807 --- /dev/null +++ b/tools/testfiles/h5diff_2.txt @@ -0,0 +1,18 @@ +############################# +Expected output for 'h5diff -x h5diff_test1.h5 h5diff_test2.h5' +############################# +-x is an invalid option +h5diff [OBJ1_NAME] [OBJ2_NAME] [-h] [-l] [-r] [-d] [-n count] [-d delta] [-p relativet] FILE1_NAME FILE2_NAME + + [OBJ1_NAME] Name of an HDF5 object + [OBJ2_NAME] Name of an HDF5 object + [-h ] Print a basic help message (this message) + [-l ] List contents of file + [-r ] Print only what objects differ + [-n count] Print difference up to count number for each variable + [-d delta] Print difference when it is greater than limit delta + [-p relative] Print differences which are within a relative error value + FILE1_NAME File name of the first HDF5 file + FILE2_NAME File name of the second HDF5 file + +Items in [ ] are optional diff --git a/tools/testfiles/h5diff_3.txt b/tools/testfiles/h5diff_3.txt new file mode 100644 index 0000000..35fcf8b --- /dev/null +++ b/tools/testfiles/h5diff_3.txt @@ -0,0 +1,17 @@ +############################# +Expected output for 'h5diff -h h5diff_test1.h5 h5diff_test2.h5' +############################# +h5diff [OBJ1_NAME] [OBJ2_NAME] [-h] [-l] [-r] [-d] [-n count] [-d delta] [-p relativet] FILE1_NAME FILE2_NAME + + [OBJ1_NAME] Name of an HDF5 object + [OBJ2_NAME] Name of an HDF5 object + [-h ] Print a basic help message (this message) + [-l ] List contents of file + [-r ] Print only what objects differ + [-n count] Print difference up to count number for each variable + [-d delta] Print difference when it is greater than limit delta + [-p relative] Print differences which are within a relative error value + FILE1_NAME File name of the first HDF5 file + FILE2_NAME File name of the second HDF5 file + +Items in [ ] are optional diff --git a/tools/testfiles/h5diff_4.txt b/tools/testfiles/h5diff_4.txt new file mode 100644 index 0000000..db8cd04 --- /dev/null +++ b/tools/testfiles/h5diff_4.txt @@ -0,0 +1,18 @@ +############################# +Expected output for 'h5diff -d h5diff_test1.h5 h5diff_test2.h5' +############################# +<-d h5diff_test1.h5> is not a valid option +h5diff [OBJ1_NAME] [OBJ2_NAME] [-h] [-l] [-r] [-d] [-n count] [-d delta] [-p relativet] FILE1_NAME FILE2_NAME + + [OBJ1_NAME] Name of an HDF5 object + [OBJ2_NAME] Name of an HDF5 object + [-h ] Print a basic help message (this message) + [-l ] List contents of file + [-r ] Print only what objects differ + [-n count] Print difference up to count number for each variable + [-d delta] Print difference when it is greater than limit delta + [-p relative] Print differences which are within a relative error value + FILE1_NAME File name of the first HDF5 file + FILE2_NAME File name of the second HDF5 file + +Items in [ ] are optional diff --git a/tools/testfiles/h5diff_5.txt b/tools/testfiles/h5diff_5.txt new file mode 100644 index 0000000..b150802 --- /dev/null +++ b/tools/testfiles/h5diff_5.txt @@ -0,0 +1,18 @@ +############################# +Expected output for 'h5diff -d -4 h5diff_test1.h5 h5diff_test2.h5' +############################# +<-d -4> is not a valid option +h5diff [OBJ1_NAME] [OBJ2_NAME] [-h] [-l] [-r] [-d] [-n count] [-d delta] [-p relativet] FILE1_NAME FILE2_NAME + + [OBJ1_NAME] Name of an HDF5 object + [OBJ2_NAME] Name of an HDF5 object + [-h ] Print a basic help message (this message) + [-l ] List contents of file + [-r ] Print only what objects differ + [-n count] Print difference up to count number for each variable + [-d delta] Print difference when it is greater than limit delta + [-p relative] Print differences which are within a relative error value + FILE1_NAME File name of the first HDF5 file + FILE2_NAME File name of the second HDF5 file + +Items in [ ] are optional -- cgit v0.12