com php-src: add test for bug #72701: ext/mysqli/tests/bug72701.phpt
| From: | Anatol Belski | Date: | Fri, 29 Jul 2016 15:23:39 +0000 |
| Subject: | com php-src: add test for bug #72701: ext/mysqli/tests/bug72701.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93478@lists.php.net to get a copy of this message | ||
Commit: 9b9aeb66bd0e5f87f8a5b4e87e68ce163895991c
Author: Anatol Belski <ab@php.net> Fri, 29 Jul 2016 17:23:39 +0200
Parents: 8033fb4044f1f7de0e8303098e19e2cfceee4014
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9b9aeb66bd0e5f87f8a5b4e87e68ce163895991c
Log:
add test for bug #72701
Bugs:
https://bugs.php.net/72701
Changed paths:
A ext/mysqli/tests/bug72701.phpt
Diff:
diff --git a/ext/mysqli/tests/bug72701.phpt b/ext/mysqli/tests/bug72701.phpt
new file mode 100644
index 0000000..f0eb174
--- /dev/null
+++ b/ext/mysqli/tests/bug72701.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #72701 mysqli_get_host_info() wrong output
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+require_once("connect.inc");
+
+if ("127.0.0.1" != $host && "localhost" != $host) {
+ die("skip require 127.0.0.1 connection");
+}
+
+?>
+--FILE--
+<?php
+
+require_once("connect.inc");
+
+$con = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
+
+if (mysqli_connect_errno()) {
+ echo "Failed to connect to MySQL: " . mysqli_connect_error();
+}
+
+var_dump(preg_match(",(127.0.0.1|localhost) via .*,i", mysqli_get_host_info($con)));
+
+mysqli_close($con);
+?>
+==DONE==
+--EXPECT--
+int(1)
+==DONE==