From d679f02295ea079338f029b7f5f4cb65b37f190c Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 15 Oct 2018 04:33:09 +0200 Subject: 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-' ' characters plus a terminating '' 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 --- ext/xmlreader/tests/002.phpt | 1 - ext/xmlreader/tests/expand.phpt | 2 +- ext/xmlreader/tests/expand_error.phpt | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/xmlreader') diff --git a/ext/xmlreader/tests/002.phpt b/ext/xmlreader/tests/002.phpt index 23c43373a0..6101d6cc48 100644 --- a/ext/xmlreader/tests/002.phpt +++ b/ext/xmlreader/tests/002.phpt @@ -33,7 +33,6 @@ unlink($filename); ?> ===DONE=== --EXPECTF-- - Warning: XMLReader::open(): Empty string supplied as input in %s on line %d books books diff --git a/ext/xmlreader/tests/expand.phpt b/ext/xmlreader/tests/expand.phpt index 9b8b7258b7..3d9b0a53c3 100644 --- a/ext/xmlreader/tests/expand.phpt +++ b/ext/xmlreader/tests/expand.phpt @@ -34,4 +34,4 @@ $reader->close(); ===DONE=== --EXPECT-- base book -===DONE=== \ No newline at end of file +===DONE=== diff --git a/ext/xmlreader/tests/expand_error.phpt b/ext/xmlreader/tests/expand_error.phpt index 4b2799336b..2813e836d9 100644 --- a/ext/xmlreader/tests/expand_error.phpt +++ b/ext/xmlreader/tests/expand_error.phpt @@ -26,4 +26,4 @@ Warning: XMLReader::expand(): Load Data before trying to expand in %s on line %d bool(false) Warning: XMLReader::expand(): An Error Occurred while expanding in %s on line %d -bool(false) \ No newline at end of file +bool(false) -- cgit v1.2.1