]> granicus.if.org Git - check/commitdiff
test_output.sh: do not include leading 'x' in expected output
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 4 Jan 2014 18:33:56 +0000 (18:33 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 4 Jan 2014 18:33:56 +0000 (18:33 +0000)
Mostly because it can be confusing.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1020 64e312b2-a51f-0410-8e61-82d0ca0eb02a

tests/test_output.sh

index 92a53188bbce34ddc4ffd643f271c2d5d67f387f..fa679791337081f84f83af40f363fae0a9c12a5e 100755 (executable)
@@ -8,22 +8,22 @@ else
     SRCDIR=""
 fi
 
-exp_silent="x"
+exp_silent=""
 
 if [ $HAVE_FORK -eq 1 ]; then
-exp_minimal="xRunning suite(s): S1
+exp_minimal="Running suite(s): S1
  S2
  XML escape \" ' < > & tests
 37%: Checks: 8, Failures: 4, Errors: 1"
 else
-exp_minimal="xRunning suite(s): S1
+exp_minimal="Running suite(s): S1
  S2
  XML escape \" ' < > & tests
 42%: Checks: 7, Failures: 4, Errors: 0"
 fi
 
 if [ $HAVE_FORK -eq 1 ]; then
-exp_normal="xRunning suite(s): S1
+exp_normal="Running suite(s): S1
  S2
  XML escape \" ' < > & tests
 37%: Checks: 8, Failures: 4, Errors: 1
@@ -33,7 +33,7 @@ ${SRCDIR}ex_output.c:52:F:Core:test_loop:0: Iteration 0 failed
 ${SRCDIR}ex_output.c:52:F:Core:test_loop:2: Iteration 2 failed
 ${SRCDIR}ex_output.c:58:F:description \" ' < > &:test_xml_esc_fail_msg:0: fail \" ' < > & message"
 else
-exp_normal="xRunning suite(s): S1
+exp_normal="Running suite(s): S1
  S2
  XML escape \" ' < > & tests
 42%: Checks: 7, Failures: 4, Errors: 0
@@ -44,7 +44,7 @@ ${SRCDIR}ex_output.c:58:F:description \" ' < > &:test_xml_esc_fail_msg:0: fail \
 fi
 
 if [ $HAVE_FORK -eq 1 ]; then
-exp_verbose="xRunning suite(s): S1
+exp_verbose="Running suite(s): S1
  S2
  XML escape \" ' < > & tests
 37%: Checks: 8, Failures: 4, Errors: 1
@@ -57,7 +57,7 @@ ${SRCDIR}ex_output.c:52:P:Core:test_loop:1: Passed
 ${SRCDIR}ex_output.c:52:F:Core:test_loop:2: Iteration 2 failed
 ${SRCDIR}ex_output.c:58:F:description \" ' < > &:test_xml_esc_fail_msg:0: fail \" ' < > & message"
 else
-exp_verbose="xRunning suite(s): S1
+exp_verbose="Running suite(s): S1
  S2
  XML escape \" ' < > & tests
 42%: Checks: 7, Failures: 4, Errors: 0
@@ -71,7 +71,7 @@ ${SRCDIR}ex_output.c:58:F:description \" ' < > &:test_xml_esc_fail_msg:0: fail \
 fi
 
 if [ $HAVE_FORK -eq 1 ]; then
-exp_subunit="xtest: Core:test_pass
+exp_subunit="test: Core:test_pass
 success: Core:test_pass
 test: Core:test_fail
 failure: Core:test_fail [
@@ -98,7 +98,7 @@ failure: description \" ' < > &:test_xml_esc_fail_msg [
 ${SRCDIR}ex_output.c:58: fail \" ' < > & message
 ]"
 else
-exp_subunit="xtest: Core:test_pass
+exp_subunit="test: Core:test_pass
 success: Core:test_pass
 test: Core:test_fail
 failure: Core:test_fail [
@@ -132,7 +132,7 @@ fi
 
 
 test_output ( ) {
-    if [ "${1}" != "${2}" ]; then
+    if [ "x${1}" != "x${2}" ]; then
        echo "Problem with ex_output${EXEEXT} ${3}";
        echo "Expected:";
        echo "${1}";
@@ -143,11 +143,11 @@ test_output ( ) {
     
 }
 
-test_output "$exp_silent" x"$act_silent" "CK_SILENT STDOUT NORMAL";
-test_output "$exp_minimal" x"$act_minimal" "CK_MINIMAL STDOUT NORMAL";
-test_output "$exp_normal" x"$act_normal" "CK_NORMAL STDOUT NORMAL";
-test_output "$exp_verbose" x"$act_verbose" "CK_VERBOSE STDOUT NORMAL";
+test_output "$exp_silent" "$act_silent" "CK_SILENT STDOUT NORMAL";
+test_output "$exp_minimal" "$act_minimal" "CK_MINIMAL STDOUT NORMAL";
+test_output "$exp_normal" "$act_normal" "CK_NORMAL STDOUT NORMAL";
+test_output "$exp_verbose" "$act_verbose" "CK_VERBOSE STDOUT NORMAL";
 if test 1 -eq $ENABLE_SUBUNIT; then
-test_output "$exp_subunit" x"$act_subunit" "CK_SUBUNIT STDOUT NORMAL";
+test_output "$exp_subunit" "$act_subunit" "CK_SUBUNIT STDOUT NORMAL";
 fi
 exit 0