]> git.saurik.com Git - apt.git/commitdiff
tests: store msgmsg message for display in fail as well
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 4 Sep 2015 09:31:36 +0000 (11:31 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 14 Sep 2015 13:22:17 +0000 (15:22 +0200)
Git-Dch: Ignore

test/integration/framework

index 18bfec7edf0496eb6c7e48312fd1d5cc7296b1b7..6cba26c8dcd10685920e6bfb4d481114661b0d22 100644 (file)
@@ -66,6 +66,9 @@ msgtest() { msgprintf "${CINFO}%s" "${CCMD}%s${CINFO}" "…${CNORMAL} " "$@"; }
 msgpass() { printf "${CPASS}PASS${CNORMAL}\n"; }
 msgskip() {
        if [ -n "$MSGTEST_MSG" ]; then
+               if [ -n "$MSGTEST_MSGMSG" ]; then
+                       echo "$MSGTEST_MSGMSG"
+               fi
                if [ -n "$MSGTEST_GRP" ] && [ "$MSGTEST_GRP" != 'NEXT' ] && [ "$MSGTEST_GRP" != "$MSGTEST_MSG" ]; then
                        echo "Part of the test group: $MSGTEST_GRP"
                fi
@@ -77,6 +80,9 @@ msgskip() {
 }
 msgfail() {
        if [ -n "$MSGTEST_MSG" ]; then
+               if [ -n "$MSGTEST_MSGMSG" ]; then
+                       echo "$MSGTEST_MSGMSG"
+               fi
                if [ -n "$MSGTEST_GRP" ] && [ "$MSGTEST_GRP" != 'NEXT' ] && [ "$MSGTEST_GRP" != "$MSGTEST_MSG" ]; then
                        echo "Part of the test group: $MSGTEST_GRP"
                fi
@@ -114,7 +120,9 @@ if [ $MSGLEVEL -le 1 ]; then
        msgnwarn() { true; }
 fi
 if [ $MSGLEVEL -le 2 ]; then
-       msgmsg() { true; }
+       msgmsg() {
+               MSGTEST_MSGMSG="$(msgprintf "${CMSG}%s" '%s' "${CNORMAL}" "$@")"
+       }
        msgnmsg() { true; }
        msgtest() {
                MSGTEST_MSG="$(msgprintf "${CINFO}%s" "${CCMD}%s${CINFO}" "…${CNORMAL} " "$@")"
@@ -1433,6 +1441,9 @@ testmarkedmanual() {
 msgfailoutput() {
        if [ -n "$MSGTEST_MSG" ]; then
                echo
+               if [ -n "$MSGTEST_MSGMSG" ]; then
+                       echo "$MSGTEST_MSGMSG"
+               fi
                if [ -n "$MSGTEST_GRP" ] && [ "$MSGTEST_GRP" != 'NEXT' ] && [ "$MSGTEST_GRP" != "$MSGTEST_MSG" ]; then
                        echo "${CFAIL}Part of the test group: $MSGTEST_GRP"
                fi