Commit 9d0d1ada authored by Yang Tse's avatar Yang Tse
Browse files

runtests.pl: fix printing of multivalued error codes

parent 629d2e34
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3167,6 +3167,7 @@ sub singletest {
    my $errorcode = $err[0] || "0";
    my $errorcode = $err[0] || "0";
    my $ok="";
    my $ok="";
    my $res;
    my $res;
    chomp $errorcode;
    if (@validstdout) {
    if (@validstdout) {
        # verify redirected stdout
        # verify redirected stdout
        my @actual = loadarray($STDOUT);
        my @actual = loadarray($STDOUT);
@@ -3354,7 +3355,7 @@ sub singletest {
    }
    }
    else {
    else {
        if(!$short) {
        if(!$short) {
            printf("\n%s returned $cmdres, %d was expected\n",
            printf("\n%s returned $cmdres, when expecting %s\n",
                   (!$tool)?"curl":$tool, $errorcode);
                   (!$tool)?"curl":$tool, $errorcode);
        }
        }
        logmsg " exit FAILED\n";
        logmsg " exit FAILED\n";