summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-15 04:31:31 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-15 04:31:31 +0200
commitf1d7e3ca0b70f910fcecef0278de9c15440ca3c0 (patch)
tree70af7290bf6c0b06f223254537b502013ade302e /sapi/cli
parentf98c916845571deeab189fb2ab52a17aef49edb8 (diff)
downloadphp-git-f1d7e3ca0b70f910fcecef0278de9c15440ca3c0.tar.gz
Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/tests/020.phpt1
-rw-r--r--sapi/cli/tests/bug66830.phpt1
-rw-r--r--sapi/cli/tests/bug67429.phpt1
-rw-r--r--sapi/cli/tests/bug67741.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_013.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_014.phpt1
6 files changed, 1 insertions, 7 deletions
diff --git a/sapi/cli/tests/020.phpt b/sapi/cli/tests/020.phpt
index ac23e77f6a..001cf62a38 100644
--- a/sapi/cli/tests/020.phpt
+++ b/sapi/cli/tests/020.phpt
@@ -29,4 +29,3 @@ Directive => Local Value => Master Value
%a
Done
-
diff --git a/sapi/cli/tests/bug66830.phpt b/sapi/cli/tests/bug66830.phpt
index b21b33627e..a53dbb8a20 100644
--- a/sapi/cli/tests/bug66830.phpt
+++ b/sapi/cli/tests/bug66830.phpt
@@ -41,4 +41,3 @@ Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
-
diff --git a/sapi/cli/tests/bug67429.phpt b/sapi/cli/tests/bug67429.phpt
index 2e0b6ad627..a047de6e31 100644
--- a/sapi/cli/tests/bug67429.phpt
+++ b/sapi/cli/tests/bug67429.phpt
@@ -53,4 +53,3 @@ Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
-
diff --git a/sapi/cli/tests/bug67741.phpt b/sapi/cli/tests/bug67741.phpt
index df0981443f..0861eeb653 100644
--- a/sapi/cli/tests/bug67741.phpt
+++ b/sapi/cli/tests/bug67741.phpt
@@ -14,4 +14,4 @@ echo "primary lineno: ", __LINE__, "\n";
?>
--EXPECT--
prepend lineno: 2
-primary lineno: 3 \ No newline at end of file
+primary lineno: 3
diff --git a/sapi/cli/tests/php_cli_server_013.phpt b/sapi/cli/tests/php_cli_server_013.phpt
index cfed0c5531..ec8957c8d1 100644
--- a/sapi/cli/tests/php_cli_server_013.phpt
+++ b/sapi/cli/tests/php_cli_server_013.phpt
@@ -80,7 +80,6 @@ echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\
fclose($fp);
?>
--EXPECTF--
-
HTTP/1.1 404 Not Found
Host: %s
Date: %s
@@ -108,4 +107,3 @@ Content-Length: %d
<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
</head><body><h1>Not Found</h1><p>The requested resource <code class="url">/main/foo/bar</code> was not found on this server.</p></body></html>
-
diff --git a/sapi/cli/tests/php_cli_server_014.phpt b/sapi/cli/tests/php_cli_server_014.phpt
index 7210321925..11db82ce90 100644
--- a/sapi/cli/tests/php_cli_server_014.phpt
+++ b/sapi/cli/tests/php_cli_server_014.phpt
@@ -62,7 +62,6 @@ fclose($fp);
?>
--EXPECTF--
-
HTTP/1.1 200 OK
Host: %s
Date: %s