From 17783cd09831029fabd9372bbc246a44d62c14ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 21 Apr 2005 03:59:26 +0000 Subject: [PATCH] Using sprintf "%.2f" to output the final percentage --- maintenance/parserTests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index b574bda86c..4443334d88 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -187,7 +187,7 @@ class ParserTest { } } if( $total > 0 ) { - $ratio = IntVal( 100.0 * $success / $total ); + $ratio = sprintf( "%.2f", 100 * $success / $total ); print $this->termColor( 1 ) . "\nPassed $success of $total tests ($ratio%) "; if( $success == $total ) { print $this->termColor( 32 ) . "PASSED!"; -- 2.20.1