if all tests succeeded or nonzero if at least one failed.
exit if $action eq 'extract';
build ();
-exit if $action eq 'build';
+exit success () if $action eq 'build';
run_and_grade_tests ();
write_grades ();
write_details ();
-exit if $action eq 'test';
+exit success () if $action eq 'test';
assemble_final_grade ();
exit if $action eq 'assemble';
close (FILE);
return $equal;
}
+\f
+sub success {
+ for my $test (@TESTS) {
+ return 1 if !defined ($result{$test}) || $result{$test} ne 'ok';
+ }
+ return 0;
+}
1;
}
write_grades ();
write_details ();
-exit if $action eq 'test';
+exit success () if $action eq 'test';
assemble_final_grade ();
-exit if $action eq 'assemble';
+exit success () if $action eq 'assemble';
die "Don't know how to '$action'";
our (%extra);
our ($action);
+if ($#ARGV == 0 && $ARGV[0] eq 'null') {
+ @TESTS = ('null');
+ extract_sources ();
+ build ();
+ run_and_grade_tests ();
+ exit success ();
+}
+
parse_cmd_line qw (args-argc args-argv0 args-argvn args-single args-multiple
args-dbl-space
sc-bad-sp sc-bad-arg sc-boundary
run_and_grade_tests ();
write_grades ();
write_details ();
-exit if $action eq 'test';
+exit success () if $action eq 'test';
assemble_final_grade ();
-exit if $action eq 'assemble';
+exit success () if $action eq 'assemble';
die "Don't know how to '$action'";
run_and_grade_tests ();
write_grades ();
write_details ();
-exit if $action eq 'test';
+exit success () if $action eq 'test';
assemble_final_grade ();
-exit if $action eq 'assemble';
+exit success () if $action eq 'assemble';
die "Don't know how to '$action'";