diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-10-13 11:21:27 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-10-13 11:21:27 +0200 |
commit | 3f72c77ce47ee0906905b83161d9c1d24e425d89 (patch) | |
tree | 58d19308558ed7e3f9384e0006ce6af0cb83ec56 /ext/mysqli | |
parent | 2845f859c19965691855c66bc18d94a4e06ff329 (diff) | |
download | php-git-3f72c77ce47ee0906905b83161d9c1d24e425d89.tar.gz |
Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.
Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)
To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`
Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).
Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.
Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
Diffstat (limited to 'ext/mysqli')
-rw-r--r-- | ext/mysqli/tests/bug53503.phpt | 130 | ||||
-rw-r--r-- | ext/mysqli/tests/bug55653.phpt | 70 | ||||
-rw-r--r-- | ext/mysqli/tests/bug55859.phpt | 40 | ||||
-rw-r--r-- | ext/mysqli/tests/bug62046.phpt | 78 | ||||
-rw-r--r-- | ext/mysqli/tests/bug62885.phpt | 52 |
5 files changed, 185 insertions, 185 deletions
diff --git a/ext/mysqli/tests/bug53503.phpt b/ext/mysqli/tests/bug53503.phpt index 339fce7a8e..a34b7a3416 100644 --- a/ext/mysqli/tests/bug53503.phpt +++ b/ext/mysqli/tests/bug53503.phpt @@ -1,66 +1,66 @@ ---TEST--
-Bug #53503 (mysqli::query returns false after successful LOAD DATA query)
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-
-?>
---FILE--
-<?php
- require_once("connect.inc");
-
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- }
-
- if (!$link->query("DROP TABLE IF EXISTS test")) {
- printf("[002] [%d] %s\n", $link->errno, $link->error);
- }
-
- if (!$link->query("CREATE TABLE test (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine)) {
- printf("[003] [%d] %s\n", $link->errno, $link->error);
- }
-
- if (FALSE == file_put_contents('bug53503.data', "1\n2\n3\n"))
- printf("[004] Failed to create CVS file\n");
-
- if (!$link->query("SELECT 1 FROM DUAL"))
- printf("[005] [%d] %s\n", $link->errno, $link->error);
-
- if (!$link->query("LOAD DATA LOCAL INFILE 'bug53503.data' INTO TABLE test")) {
- printf("[006] [%d] %s\n", $link->errno, $link->error);
- echo "bug";
- } else {
- echo "done";
- }
- $link->close();
-?>
---CLEAN--
-<?php
-require_once('connect.inc');
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[clean] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
-}
-
-if (!$link->query($link, 'DROP TABLE IF EXISTS test')) {
- printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-}
-
-$link->close();
-
-unlink('bug53503.data');
-?>
---EXPECT--
+--TEST-- +Bug #53503 (mysqli::query returns false after successful LOAD DATA query) +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); + +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die("skip Cannot connect to MySQL"); + +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); + +mysqli_close($link); + +?> +--FILE-- +<?php + require_once("connect.inc"); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!$link->query("DROP TABLE IF EXISTS test")) { + printf("[002] [%d] %s\n", $link->errno, $link->error); + } + + if (!$link->query("CREATE TABLE test (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine)) { + printf("[003] [%d] %s\n", $link->errno, $link->error); + } + + if (FALSE == file_put_contents('bug53503.data', "1\n2\n3\n")) + printf("[004] Failed to create CVS file\n"); + + if (!$link->query("SELECT 1 FROM DUAL")) + printf("[005] [%d] %s\n", $link->errno, $link->error); + + if (!$link->query("LOAD DATA LOCAL INFILE 'bug53503.data' INTO TABLE test")) { + printf("[006] [%d] %s\n", $link->errno, $link->error); + echo "bug"; + } else { + echo "done"; + } + $link->close(); +?> +--CLEAN-- +<?php +require_once('connect.inc'); + +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[clean] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", + $host, $user, $db, $port, $socket); +} + +if (!$link->query($link, 'DROP TABLE IF EXISTS test')) { + printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link)); +} + +$link->close(); + +unlink('bug53503.data'); +?> +--EXPECT-- done
\ No newline at end of file diff --git a/ext/mysqli/tests/bug55653.phpt b/ext/mysqli/tests/bug55653.phpt index f9cd297eba..1caff1a27a 100644 --- a/ext/mysqli/tests/bug55653.phpt +++ b/ext/mysqli/tests/bug55653.phpt @@ -1,36 +1,36 @@ ---TEST--
-Bug #55653 PS crash with libmysql when binding same variable as param and out
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifconnectfailure.inc');
-?>
---FILE--
-<?php
- require_once("connect.inc");
-
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- }
-
- $in_and_out = "a";
-
- if (!($stmt = $link->stmt_init()))
- printf("[002] [%d] %s\n", $link->errno, $link->error);
-
- if (!($stmt->prepare("SELECT ?")) ||
- !($stmt->bind_param("s", $in_and_out)) ||
- !($stmt->execute()) ||
- !($stmt->bind_result($in_and_out)))
- printf("[003] [%d] %s\n", $stmt->errno, $stmt->error);
-
- if (!$stmt->fetch())
- printf("[004] [%d] %s\n", $stmt->errno, $stmt->error);
-
- if ("a" !== $in_and_out)
- printf("[005] Wrong result: '%s'\n", $in_and_out);
-
- echo "done!";
-?>
---EXPECT--
+--TEST-- +Bug #55653 PS crash with libmysql when binding same variable as param and out +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> +--FILE-- +<?php + require_once("connect.inc"); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + + $in_and_out = "a"; + + if (!($stmt = $link->stmt_init())) + printf("[002] [%d] %s\n", $link->errno, $link->error); + + if (!($stmt->prepare("SELECT ?")) || + !($stmt->bind_param("s", $in_and_out)) || + !($stmt->execute()) || + !($stmt->bind_result($in_and_out))) + printf("[003] [%d] %s\n", $stmt->errno, $stmt->error); + + if (!$stmt->fetch()) + printf("[004] [%d] %s\n", $stmt->errno, $stmt->error); + + if ("a" !== $in_and_out) + printf("[005] Wrong result: '%s'\n", $in_and_out); + + echo "done!"; +?> +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/bug55859.phpt b/ext/mysqli/tests/bug55859.phpt index ba6e9902b3..04467bce24 100644 --- a/ext/mysqli/tests/bug55859.phpt +++ b/ext/mysqli/tests/bug55859.phpt @@ -1,20 +1,20 @@ ---TEST--
-Bug #55859 mysqli->stat property access gives error
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifconnectfailure.inc');
-?>
---FILE--
-<?php
- require_once("connect.inc");
-
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- }
- var_dump(soundex(mysqli_stat($link)) === soundex($link->stat));
- echo "done!";
-?>
---EXPECT--
-bool(true)
-done!
+--TEST-- +Bug #55859 mysqli->stat property access gives error +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> +--FILE-- +<?php + require_once("connect.inc"); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + var_dump(soundex(mysqli_stat($link)) === soundex($link->stat)); + echo "done!"; +?> +--EXPECT-- +bool(true) +done! diff --git a/ext/mysqli/tests/bug62046.phpt b/ext/mysqli/tests/bug62046.phpt index 31a7328b70..c8ad3c3675 100644 --- a/ext/mysqli/tests/bug62046.phpt +++ b/ext/mysqli/tests/bug62046.phpt @@ -1,40 +1,40 @@ ---TEST--
-Bug #62046 mysqli@mysqlnd can't iterate over stored sets after call to mysqli_stmt_reset()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifconnectfailure.inc');
-?>
---FILE--
-<?php
- require_once("connect.inc");
-
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- }
- if (FALSE === ($stmt = $link->prepare('SELECT 42'))) {
- printf("[002] Prepare failed, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- }
- if (FALSE === $stmt->execute()) {
- printf("[003] Execute failed, [%d] %s\n", $stmt->errorno, $stmt->error);
- }
- if (FALSE === $stmt->store_result()) {
- printf("[004] store_result failed, [%d] %s\n", $stmt->errorno, $stmt->error);
- }
- $one = NULL;
- if (FALSE === $stmt->bind_result($one)) {
- printf("[005] bind_result failed, [%d] %s\n", $stmt->errorno, $stmt->error);
- }
- if (FALSE === $stmt->reset()) {
- printf("[006] bind_result failed, [%d] %s\n", $stmt->errorno, $stmt->error);
- }
- while ($stmt->fetch()) {
- var_dump($one);
- }
- $stmt->close();
- $link->close();
- echo "done!";
-?>
---EXPECT--
-int(42)
+--TEST-- +Bug #62046 mysqli@mysqlnd can't iterate over stored sets after call to mysqli_stmt_reset() +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> +--FILE-- +<?php + require_once("connect.inc"); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + if (FALSE === ($stmt = $link->prepare('SELECT 42'))) { + printf("[002] Prepare failed, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + } + if (FALSE === $stmt->execute()) { + printf("[003] Execute failed, [%d] %s\n", $stmt->errorno, $stmt->error); + } + if (FALSE === $stmt->store_result()) { + printf("[004] store_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); + } + $one = NULL; + if (FALSE === $stmt->bind_result($one)) { + printf("[005] bind_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); + } + if (FALSE === $stmt->reset()) { + printf("[006] bind_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); + } + while ($stmt->fetch()) { + var_dump($one); + } + $stmt->close(); + $link->close(); + echo "done!"; +?> +--EXPECT-- +int(42) done!
\ No newline at end of file diff --git a/ext/mysqli/tests/bug62885.phpt b/ext/mysqli/tests/bug62885.phpt index 9fb0aa0f03..4d02475570 100644 --- a/ext/mysqli/tests/bug62885.phpt +++ b/ext/mysqli/tests/bug62885.phpt @@ -1,26 +1,26 @@ ---TEST--
-Bug #62885 (mysqli_poll - Segmentation fault)
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once("connect.inc");
-if (!$IS_MYSQLND) {
- die("skip mysqlnd only test");
-}
-?>
---FILE--
-<?php
-error_reporting(E_ALL);
-$tablica = array();
-$test1 = mysqli_poll($test2, $test3, $tablica, null);
-
-$test2 = array();
-$test2 = array();
-$test1 = mysqli_poll($test2, $test3, $tablica, null);
-echo "okey";
-?>
---EXPECTF--
-Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d
-
-Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d
-okey
+--TEST-- +Bug #62885 (mysqli_poll - Segmentation fault) +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once("connect.inc"); +if (!$IS_MYSQLND) { + die("skip mysqlnd only test"); +} +?> +--FILE-- +<?php +error_reporting(E_ALL); +$tablica = array(); +$test1 = mysqli_poll($test2, $test3, $tablica, null); + +$test2 = array(); +$test2 = array(); +$test1 = mysqli_poll($test2, $test3, $tablica, null); +echo "okey"; +?> +--EXPECTF-- +Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d + +Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d +okey |