Give a better failure message for the cases where a test failed not
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Nov 2012 17:54:14 +0000 (17:54 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Nov 2012 17:54:14 +0000 (17:54 +0000)
because of an incorrect exit status but because of the error message not
being what we expected.

Include the name of the program being tested in the capture
filter/interface options tests.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@46110 f5534014-38df-0310-8fa8-9805f1628bb7

test/suite-clopts.sh

index 5a534792b36a46ba964222f059c7f9eb0436d675..c6118c559ce2ca41a361f2dfb93d6628381a6496 100755 (executable)
@@ -102,7 +102,7 @@ clopts_step_dumpcap_invalid_capfilter() {
                        test_step_ok
                else
                        test_step_output_print ./testout.txt
-                       test_step_failed "Infos"
+                       test_step_failed "Unexpected error message"
                fi
        fi
 }
@@ -120,7 +120,7 @@ clopts_step_dumpcap_invalid_interfaces() {
                        test_step_ok
                else
                        test_step_output_print ./testout.txt
-                       test_step_failed "Infos"
+                       test_step_failed "Unexpected error message"
                fi
        fi
 }
@@ -138,7 +138,7 @@ clopts_step_dumpcap_invalid_interfaces_index() {
                        test_step_ok
                else
                        test_step_output_print ./testout.txt
-                       test_step_failed "Infos"
+                       test_step_failed "Unexpected error message"
                fi
        fi
 }
@@ -221,7 +221,7 @@ clopts_step_tshark_invalid_capfilter() {
                        test_step_ok
                else
                        test_step_output_print ./testout.txt
-                       test_step_failed "Infos"
+                       test_step_failed "Unexpected error message"
                fi
        fi
 }
@@ -239,7 +239,7 @@ clopts_step_tshark_invalid_interfaces() {
                        test_step_ok
                else
                        test_step_output_print ./testout.txt
-                       test_step_failed "Infos"
+                       test_step_failed "Unexpected error message"
                fi
        fi
 }
@@ -257,7 +257,7 @@ clopts_step_tshark_invalid_interfaces_index() {
                        test_step_ok
                else
                        test_step_output_print ./testout.txt
-                       test_step_failed "Infos"
+                       test_step_failed "Unexpected error message"
                fi
        fi
 }
@@ -285,16 +285,16 @@ clopts_suite_basic() {
        test_step_add "Exit status for none existing files must be 2" clopts_step_nonexisting_file
 }
 
-clopts_suite_tshark_capture_options() {
-       test_step_add  "Invalid capture filter -f" clopts_step_tshark_invalid_capfilter
-       test_step_add  "Invalid capture interface -i" clopts_step_tshark_invalid_interfaces
-       test_step_add  "Invalid capture interface index 0" clopts_step_tshark_invalid_interfaces_index
+clopts_suite_dumpcap_capture_options() {
+       test_step_add  "Invalid dumpcap capture filter -f" clopts_step_dumpcap_invalid_capfilter
+       test_step_add  "Invalid dumpcap capture interface -i" clopts_step_dumpcap_invalid_interfaces
+       test_step_add  "Invalid dumpcap capture interface index 0" clopts_step_dumpcap_invalid_interfaces_index
 }
 
-clopts_suite_dumpcap_capture_options() {
-       test_step_add  "Invalid capture filter -f" clopts_step_dumpcap_invalid_capfilter
-       test_step_add  "Invalid capture interface -i" clopts_step_dumpcap_invalid_interfaces
-       test_step_add  "Invalid capture interface index 0" clopts_step_dumpcap_invalid_interfaces_index
+clopts_suite_tshark_capture_options() {
+       test_step_add  "Invalid TShark capture filter -f" clopts_step_tshark_invalid_capfilter
+       test_step_add  "Invalid TShark capture interface -i" clopts_step_tshark_invalid_interfaces
+       test_step_add  "Invalid TShark capture interface index 0" clopts_step_tshark_invalid_interfaces_index
 }
 
 clopts_post_step() {