allow msgtest to be used with only one parameter
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 3 Mar 2012 10:40:22 +0000 (11:40 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 3 Mar 2012 10:40:22 +0000 (11:40 +0100)
test/integration/framework

index 99088b5..a738d27 100644 (file)
@@ -29,7 +29,8 @@ msgtest() {
        while [ -n "$1" ]; do
                echo -n "${CINFO}$1${CCMD} " >&2;
                echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} " >&2;
-               shift 2
+               shift
+               if [ -n "$1" ]; then shift; else break; fi
        done
        echo -n "…${CNORMAL} " >&2;
 }