X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Ftests.pm;h=2e3642c664a0449217d0ad7058537e7c389233f0;hb=cf9ba7a17eb6e9ac5da59778f5ab51939370d712;hp=d085df1c98de59d7430a7cfc3dc9caa571f5672f;hpb=4ebf33908a571a7cde93fe618902b044e3633cdf;p=pintos-anon diff --git a/src/tests/tests.pm b/src/tests/tests.pm index d085df1..2e3642c 100644 --- a/src/tests/tests.pm +++ b/src/tests/tests.pm @@ -1,6 +1,6 @@ use strict; use warnings; -use Algorithm::Diff; +use tests::Algorithm::Diff; sub fail; sub pass; @@ -80,12 +80,6 @@ sub check_for_keyword { $kw_line =~ s/^\([^\)]+\)\s+//; print "$kw_line\n"; - # Append output, eliminating uninteresting header and trailer info - # if possible. - my (@core) = get_core_output (@output); - @output = @core if @core; - print "Program output:\n\n" . join ('', map ("$_\n", @output)); - fail; } @@ -96,18 +90,9 @@ sub check_for_triple_fault { print < 1; - } - fail; } @@ -133,13 +118,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.