function finish_test() { $this->erase_progress_bar(); $red = red_string(); $blue = blue_string(); $green = green_string(); $reset = reset_string(); $test = $this->get_name(); $triple = $this->get_triple_string(true); $phrase = $this->get_appropriate_phrase(); $colour = $this->get_appropriate_colour(); $word = "{$colour}{$phrase}:{$reset}"; // a color or a reset involves 6 characters, but gets displayed as zero. // Those 6 need to be taken into account for sprintf $string = sprintf("%-27s %20s %41s\n", $test, $word, $triple); print "{$string}"; write_status("results", strip_colour($string)); }
function log_status($status, $test_name, $subject, $reason) { $status_name = ucfirst($status); if ($reason != "") { $reason = " - {$reason}"; } write_status($status, "{$test_name}: {$status_name} {$subject}{$reason}\n"); }
function set_status_success() { global $status_array, $complete, $success; //Mark all the others complete and flush foreach ($status_array as $key => $value) { $status_array[$key] = $complete; } $status_array['finalinfo'] = $success; write_status(); }