Always print output for failing test cases.
[pintos-anon] / src / tests / tests.pm
index d085df1c98de59d7430a7cfc3dc9caa571f5672f..3c5574122ea14014793b894930796dea353b95ef 100644 (file)
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Algorithm::Diff;
+use tests::Algorithm::Diff;
 
 sub fail;
 sub pass;
@@ -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.