From 3f72c77ce47ee0906905b83161d9c1d24e425d89 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 13 Oct 2018 11:21:27 +0200 Subject: 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. --- ext/mysqli/tests/bug53503.phpt | 130 ++++++++++++++++++++--------------------- ext/mysqli/tests/bug55653.phpt | 70 +++++++++++----------- ext/mysqli/tests/bug55859.phpt | 40 ++++++------- ext/mysqli/tests/bug62046.phpt | 78 ++++++++++++------------- ext/mysqli/tests/bug62885.phpt | 52 ++++++++--------- 5 files changed, 185 insertions(+), 185 deletions(-) (limited to 'ext/mysqli') 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-- -errno, $link->error)); - -mysqli_close($link); - -?> ---FILE-- -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-- -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-- +errno, $link->error)); + +mysqli_close($link); + +?> +--FILE-- +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-- +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-- - ---FILE-- -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-- + +--FILE-- +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-- - ---FILE-- -stat)); - echo "done!"; -?> ---EXPECT-- -bool(true) -done! +--TEST-- +Bug #55859 mysqli->stat property access gives error +--SKIPIF-- + +--FILE-- +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-- - ---FILE-- -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-- + +--FILE-- +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-- - ---FILE-- - ---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-- + +--FILE-- + +--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 -- cgit v1.2.1