summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-15 04:32:30 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-15 04:32:30 +0200
commitb746e6988743b46ccb0542d5d568eef0608ee296 (patch)
tree2f5248149fec900b613e165f7dd050da0011743e /sapi
parent3599a2d82beff1ff3387a04c73fcdac9dd5336d4 (diff)
downloadphp-git-b746e6988743b46ccb0542d5d568eef0608ee296.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')
-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
-rw-r--r--sapi/fpm/tests/log-bwd-msg-with-nl.phpt2
-rw-r--r--sapi/fpm/tests/log-bwd-multiple-msgs.phpt2
-rw-r--r--sapi/fpm/tests/pool-apparmor-basic.phpt2
-rw-r--r--sapi/fpm/tests/pool-prefix.phpt2
-rw-r--r--sapi/fpm/tests/proc-user-ignored.phpt2
-rw-r--r--sapi/fpm/tests/socket-uds-acl.phpt2
-rw-r--r--sapi/phpdbg/tests/breakpoints_001.phpt1
-rw-r--r--sapi/phpdbg/tests/breakpoints_002.phpt1
-rw-r--r--sapi/phpdbg/tests/breakpoints_003.phpt1
-rw-r--r--sapi/phpdbg/tests/breakpoints_005.phpt1
-rw-r--r--sapi/phpdbg/tests/breakpoints_006.phpt1
-rw-r--r--sapi/phpdbg/tests/breakpoints_007.phpt1
-rw-r--r--sapi/phpdbg/tests/breakpoints_008.phpt1
-rw-r--r--sapi/phpdbg/tests/include_once.phpt1
-rw-r--r--sapi/phpdbg/tests/phpdbg_oplog_001.phpt1
-rw-r--r--sapi/tests/test001.phpt2
-rw-r--r--sapi/tests/test002.phpt2
-rw-r--r--sapi/tests/test003.phpt2
-rw-r--r--sapi/tests/test004.phpt2
-rw-r--r--sapi/tests/test006.phpt1
-rw-r--r--sapi/tests/test007.phpt1
27 files changed, 11 insertions, 28 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
diff --git a/sapi/fpm/tests/log-bwd-msg-with-nl.phpt b/sapi/fpm/tests/log-bwd-msg-with-nl.phpt
index 99385400b9..67a793f8a0 100644
--- a/sapi/fpm/tests/log-bwd-msg-with-nl.phpt
+++ b/sapi/fpm/tests/log-bwd-msg-with-nl.phpt
@@ -43,4 +43,4 @@ Done
<?php
require_once "tester.inc";
FPM\Tester::clean();
-?> \ No newline at end of file
+?>
diff --git a/sapi/fpm/tests/log-bwd-multiple-msgs.phpt b/sapi/fpm/tests/log-bwd-multiple-msgs.phpt
index a21e4722b3..1517f4a554 100644
--- a/sapi/fpm/tests/log-bwd-multiple-msgs.phpt
+++ b/sapi/fpm/tests/log-bwd-multiple-msgs.phpt
@@ -47,4 +47,4 @@ Done
<?php
require_once "tester.inc";
FPM\Tester::clean();
-?> \ No newline at end of file
+?>
diff --git a/sapi/fpm/tests/pool-apparmor-basic.phpt b/sapi/fpm/tests/pool-apparmor-basic.phpt
index 733f42f3f5..53245b7ea7 100644
--- a/sapi/fpm/tests/pool-apparmor-basic.phpt
+++ b/sapi/fpm/tests/pool-apparmor-basic.phpt
@@ -60,4 +60,4 @@ Done
<?php
require_once "tester.inc";
FPM\Tester::clean();
-?> \ No newline at end of file
+?>
diff --git a/sapi/fpm/tests/pool-prefix.phpt b/sapi/fpm/tests/pool-prefix.phpt
index b32b37e13a..d128c23287 100644
--- a/sapi/fpm/tests/pool-prefix.phpt
+++ b/sapi/fpm/tests/pool-prefix.phpt
@@ -51,4 +51,4 @@ Done
<?php
require_once "tester.inc";
FPM\Tester::clean();
-?> \ No newline at end of file
+?>
diff --git a/sapi/fpm/tests/proc-user-ignored.phpt b/sapi/fpm/tests/proc-user-ignored.phpt
index 42a7dc2392..e1902af11b 100644
--- a/sapi/fpm/tests/proc-user-ignored.phpt
+++ b/sapi/fpm/tests/proc-user-ignored.phpt
@@ -43,4 +43,4 @@ Done
<?php
require_once "tester.inc";
FPM\Tester::clean();
-?> \ No newline at end of file
+?>
diff --git a/sapi/fpm/tests/socket-uds-acl.phpt b/sapi/fpm/tests/socket-uds-acl.phpt
index 6423ae446c..775d6561d4 100644
--- a/sapi/fpm/tests/socket-uds-acl.phpt
+++ b/sapi/fpm/tests/socket-uds-acl.phpt
@@ -84,4 +84,4 @@ Done
<?php
require_once "tester.inc";
FPM\Tester::clean();
-?> \ No newline at end of file
+?>
diff --git a/sapi/phpdbg/tests/breakpoints_001.phpt b/sapi/phpdbg/tests/breakpoints_001.phpt
index 17e7c65cbf..28f11760c8 100644
--- a/sapi/phpdbg/tests/breakpoints_001.phpt
+++ b/sapi/phpdbg/tests/breakpoints_001.phpt
@@ -30,4 +30,3 @@ echo $i++;
echo $i++;
echo $i++;
echo $i++;
-
diff --git a/sapi/phpdbg/tests/breakpoints_002.phpt b/sapi/phpdbg/tests/breakpoints_002.phpt
index 96c98194b1..93351321a8 100644
--- a/sapi/phpdbg/tests/breakpoints_002.phpt
+++ b/sapi/phpdbg/tests/breakpoints_002.phpt
@@ -37,4 +37,3 @@ echo $i++;
echo $i++;
echo $i++;
echo $i++;
-
diff --git a/sapi/phpdbg/tests/breakpoints_003.phpt b/sapi/phpdbg/tests/breakpoints_003.phpt
index 12b2504487..9a1f7cccc5 100644
--- a/sapi/phpdbg/tests/breakpoints_003.phpt
+++ b/sapi/phpdbg/tests/breakpoints_003.phpt
@@ -30,4 +30,3 @@ echo $i++;
echo $i++;
echo $i++;
echo $i++;
-
diff --git a/sapi/phpdbg/tests/breakpoints_005.phpt b/sapi/phpdbg/tests/breakpoints_005.phpt
index 653dab9fcc..3120405896 100644
--- a/sapi/phpdbg/tests/breakpoints_005.phpt
+++ b/sapi/phpdbg/tests/breakpoints_005.phpt
@@ -25,4 +25,3 @@ function foo($bar) {
}
foo("test");
-
diff --git a/sapi/phpdbg/tests/breakpoints_006.phpt b/sapi/phpdbg/tests/breakpoints_006.phpt
index fa6f0cdc5b..3e0e94541d 100644
--- a/sapi/phpdbg/tests/breakpoints_006.phpt
+++ b/sapi/phpdbg/tests/breakpoints_006.phpt
@@ -23,4 +23,3 @@ function foo($bar) {
}
foo("test");
-
diff --git a/sapi/phpdbg/tests/breakpoints_007.phpt b/sapi/phpdbg/tests/breakpoints_007.phpt
index f921c257c5..900ccee083 100644
--- a/sapi/phpdbg/tests/breakpoints_007.phpt
+++ b/sapi/phpdbg/tests/breakpoints_007.phpt
@@ -22,4 +22,3 @@ class bar {
}
(new bar)->foo("test");
-
diff --git a/sapi/phpdbg/tests/breakpoints_008.phpt b/sapi/phpdbg/tests/breakpoints_008.phpt
index cbe5042c2b..3aa7aa2595 100644
--- a/sapi/phpdbg/tests/breakpoints_008.phpt
+++ b/sapi/phpdbg/tests/breakpoints_008.phpt
@@ -31,4 +31,3 @@ namespace Foo {
namespace {
(new \Foo\Bar)->Foo("test");
}
-
diff --git a/sapi/phpdbg/tests/include_once.phpt b/sapi/phpdbg/tests/include_once.phpt
index 0a00e04cde..b91f5e83a0 100644
--- a/sapi/phpdbg/tests/include_once.phpt
+++ b/sapi/phpdbg/tests/include_once.phpt
@@ -13,4 +13,3 @@ prompt>
include_once __DIR__.'/include.inc';
include_once __DIR__.'/include.inc';
-
diff --git a/sapi/phpdbg/tests/phpdbg_oplog_001.phpt b/sapi/phpdbg/tests/phpdbg_oplog_001.phpt
index e4e558b9fa..5a5e9ba61c 100644
--- a/sapi/phpdbg/tests/phpdbg_oplog_001.phpt
+++ b/sapi/phpdbg/tests/phpdbg_oplog_001.phpt
@@ -55,4 +55,3 @@ $a->b();
$a->b('ha');
var_dump(phpdbg_end_oplog(["functions" => true]));
-
diff --git a/sapi/tests/test001.phpt b/sapi/tests/test001.phpt
index a964393fd9..318ab7a90f 100644
--- a/sapi/tests/test001.phpt
+++ b/sapi/tests/test001.phpt
@@ -13,4 +13,4 @@ END;
echo "HELLO";
?>
--EXPECT--
-HELLO \ No newline at end of file
+HELLO
diff --git a/sapi/tests/test002.phpt b/sapi/tests/test002.phpt
index 42ade3d96b..4afd8e276f 100644
--- a/sapi/tests/test002.phpt
+++ b/sapi/tests/test002.phpt
@@ -19,4 +19,4 @@ END;
echo "HELLO";
?>
--EXPECT--
-HELLO \ No newline at end of file
+HELLO
diff --git a/sapi/tests/test003.phpt b/sapi/tests/test003.phpt
index 5cabe66b32..24abdbbf41 100644
--- a/sapi/tests/test003.phpt
+++ b/sapi/tests/test003.phpt
@@ -18,4 +18,4 @@ END;
echo $_SERVER['PATH_INFO'];
?>
--EXPECT--
-/path/info \ No newline at end of file
+/path/info
diff --git a/sapi/tests/test004.phpt b/sapi/tests/test004.phpt
index ef4377484e..d1da1db6ed 100644
--- a/sapi/tests/test004.phpt
+++ b/sapi/tests/test004.phpt
@@ -23,4 +23,4 @@ END;
echo $_SERVER['PATH_INFO'];
?>
--EXPECT--
-/path/info \ No newline at end of file
+/path/info
diff --git a/sapi/tests/test006.phpt b/sapi/tests/test006.phpt
index d3cd74e7da..c43fe493c3 100644
--- a/sapi/tests/test006.phpt
+++ b/sapi/tests/test006.phpt
@@ -43,7 +43,6 @@ Content-Type: application/octet-stream
phpinfo();
?>
-----------------------------240723202011929--
-
--FILE--
<?php
error_reporting(0);
diff --git a/sapi/tests/test007.phpt b/sapi/tests/test007.phpt
index 84d9bdb89a..76fca8fcd6 100644
--- a/sapi/tests/test007.phpt
+++ b/sapi/tests/test007.phpt
@@ -38,7 +38,6 @@ Content-Type: application/octet-stream
phpinfo();
?>
-----------------------------240723202011929--
-
--FILE--
<?php
print @$_POST['choices'];