Always print output for failing test cases.
[pintos-anon] / src / tests / tests.pm
index c2a5c64d8319ecd9b1314fcae1321802d1a8d409..3c5574122ea14014793b894930796dea353b95ef 100644 (file)
@@ -133,13 +133,13 @@ sub compare_output {
     }
     die "unknown option " . (keys (%options))[0] . "\n" if %options;
 
-    my ($msg) = "Actual output:\n" . join ('', map ("  $_\n", @output));
+    my ($msg);
 
     # Compare actual output against each allowed output.
     foreach my $exp_string (@$expected) {
        my (@expected) = split ("\n", $exp_string);
 
-       $msg .= "\nAcceptable output:\n";
+       $msg .= "Acceptable output:\n";
        $msg .= join ('', map ("  $_\n", @expected));
 
        # Check whether actual and expected match.