From: Ulf Wendel Date: Thu, 12 Jul 2007 14:24:53 +0000 (+0000) Subject: Blame me for not checking in a version that's been cleaned up with X-Git-Tag: BEFORE_IMPORT_OF_MYSQLND~173 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8ed078f817526df9a3d5c60e9c044d53764197c;p=php Blame me for not checking in a version that's been cleaned up with regards to Whitespace/CS... --- diff --git a/ext/mysql/tests/mysql_constants.phpt b/ext/mysql/tests/mysql_constants.phpt index 0d56b2e2e1..e20d32a346 100644 --- a/ext/mysql/tests/mysql_constants.phpt +++ b/ext/mysql/tests/mysql_constants.phpt @@ -3,60 +3,60 @@ Constants exported by ext/mysql --SKIPIF-- --FILE-- - true, - 'MYSQL_NUM' => true, - 'MYSQL_BOTH' => true, - 'MYSQL_CLIENT_COMPRESS' => true, - 'MYSQL_CLIENT_INTERACTIVE' => true, - 'MYSQL_CLIENT_IGNORE_SPACE' => true, - ); - - $version = mysql_get_server_info($link); - if (!preg_match('@(\d+)\.(\d+)\.(\d+)@ism', $version, $matches)) - printf("[001] Cannot get server version\n"); - $version = ($matches[1] * 100) + ($matches[2] * 10) + $matches[3]; - - if ($version > 400) { - $expected_constants = array_merge($expected_constants, array( - "MYSQL_CLIENT_SSL" => true, - )); - } - - - $unexpected_constants = array(); - - foreach ($constants as $group => $consts) { - foreach ($consts as $name => $value) { - if (stristr($name, 'mysql') && !stristr($name, 'mysqli')) { - $name = strtoupper($name); - if (isset($expected_constants[$name])) { - unset($expected_constants[$name]); - } else { - $unexpected_constants[$name] = $name; - } - } - } - } - - if (!empty($unexpected_constants)) { - printf("Dumping list of unexpected constants\n"); - var_dump($unexpected_constants); - } - - if (!empty($expected_constants)) { - printf("Dumping list of missing constants\n"); - var_dump($expected_constants); - } - - print "done!"; + true, + 'MYSQL_NUM' => true, + 'MYSQL_BOTH' => true, + 'MYSQL_CLIENT_COMPRESS' => true, + 'MYSQL_CLIENT_INTERACTIVE' => true, + 'MYSQL_CLIENT_IGNORE_SPACE' => true, +); + +$version = mysql_get_server_info($link); +if (!preg_match('@(\d+)\.(\d+)\.(\d+)@ism', $version, $matches)) + printf("[001] Cannot get server version\n"); +$version = ($matches[1] * 100) + ($matches[2] * 10) + $matches[3]; + +if ($version > 400) { + $expected_constants = array_merge($expected_constants, array( + "MYSQL_CLIENT_SSL" => true, + )); +} + + +$unexpected_constants = array(); + +foreach ($constants as $group => $consts) { + foreach ($consts as $name => $value) { + if (stristr($name, 'mysql') && !stristr($name, 'mysqli')) { + $name = strtoupper($name); + if (isset($expected_constants[$name])) { + unset($expected_constants[$name]); + } else { + $unexpected_constants[$name] = $name; + } + } + } +} + +if (!empty($unexpected_constants)) { + printf("Dumping list of unexpected constants\n"); + var_dump($unexpected_constants); +} + +if (!empty($expected_constants)) { + printf("Dumping list of missing constants\n"); + var_dump($expected_constants); +} + +print "done!"; ?> --EXPECTF-- done! \ No newline at end of file