summaryrefslogtreecommitdiff
path: root/ext/fileinfo/tests
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 /ext/fileinfo/tests
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 'ext/fileinfo/tests')
-rw-r--r--ext/fileinfo/tests/bug67516.phpt1
-rw-r--r--ext/fileinfo/tests/bug67647-mb.phpt1
-rw-r--r--ext/fileinfo/tests/bug67647.phpt1
-rw-r--r--ext/fileinfo/tests/bug68398.phpt1
-rw-r--r--ext/fileinfo/tests/bug69320.phpt1
-rw-r--r--ext/fileinfo/tests/cve-2014-3538-mb.phpt2
-rw-r--r--ext/fileinfo/tests/cve-2014-3538.phpt2
-rw-r--r--ext/fileinfo/tests/finfo_extension_flag.phpt1
-rw-r--r--ext/fileinfo/tests/finfo_open_002.phpt2
9 files changed, 2 insertions, 10 deletions
diff --git a/ext/fileinfo/tests/bug67516.phpt b/ext/fileinfo/tests/bug67516.phpt
index 48cd25277e..d4f72877e2 100644
--- a/ext/fileinfo/tests/bug67516.phpt
+++ b/ext/fileinfo/tests/bug67516.phpt
@@ -16,4 +16,3 @@ var_dump($f->file(dirname(__FILE__) . "/bug67516.gif", FILEINFO_MIME));
string(9) "image/gif"
string(25) "image/gif; charset=binary"
===DONE===
-
diff --git a/ext/fileinfo/tests/bug67647-mb.phpt b/ext/fileinfo/tests/bug67647-mb.phpt
index b8c82db793..3887d49cea 100644
--- a/ext/fileinfo/tests/bug67647-mb.phpt
+++ b/ext/fileinfo/tests/bug67647-mb.phpt
@@ -36,4 +36,3 @@ var_dump($fi->file($f));
--EXPECT--
string(15) "video/quicktime"
+++DONE+++
-
diff --git a/ext/fileinfo/tests/bug67647.phpt b/ext/fileinfo/tests/bug67647.phpt
index ff8856ef53..4682415649 100644
--- a/ext/fileinfo/tests/bug67647.phpt
+++ b/ext/fileinfo/tests/bug67647.phpt
@@ -14,4 +14,3 @@ var_dump($fi->file($f));
--EXPECT--
string(15) "video/quicktime"
+++DONE+++
-
diff --git a/ext/fileinfo/tests/bug68398.phpt b/ext/fileinfo/tests/bug68398.phpt
index 504df2b042..a761a755c1 100644
--- a/ext/fileinfo/tests/bug68398.phpt
+++ b/ext/fileinfo/tests/bug68398.phpt
@@ -12,4 +12,3 @@ var_dump($f->file(dirname(__FILE__) . DIRECTORY_SEPARATOR . '68398.zip'));
--EXPECT--
string(31) "application/zip; charset=binary"
+++DONE+++
-
diff --git a/ext/fileinfo/tests/bug69320.phpt b/ext/fileinfo/tests/bug69320.phpt
index 4078649edf..388afc3ff6 100644
--- a/ext/fileinfo/tests/bug69320.phpt
+++ b/ext/fileinfo/tests/bug69320.phpt
@@ -17,4 +17,3 @@ var_dump(finfo_file(finfo_open(FILEINFO_MIME_TYPE), $fname));
?>
--EXPECT--
string(10) "text/plain"
-
diff --git a/ext/fileinfo/tests/cve-2014-3538-mb.phpt b/ext/fileinfo/tests/cve-2014-3538-mb.phpt
index 62d8e43d9b..a29729f1f3 100644
--- a/ext/fileinfo/tests/cve-2014-3538-mb.phpt
+++ b/ext/fileinfo/tests/cve-2014-3538-mb.phpt
@@ -32,4 +32,4 @@ Done
--EXPECTF--
string(%d) "%s"
Ok
-Done \ No newline at end of file
+Done
diff --git a/ext/fileinfo/tests/cve-2014-3538.phpt b/ext/fileinfo/tests/cve-2014-3538.phpt
index d6bc9c68c8..7014629f37 100644
--- a/ext/fileinfo/tests/cve-2014-3538.phpt
+++ b/ext/fileinfo/tests/cve-2014-3538.phpt
@@ -32,4 +32,4 @@ Done
--EXPECTF--
string(%d) "%s"
Ok
-Done \ No newline at end of file
+Done
diff --git a/ext/fileinfo/tests/finfo_extension_flag.phpt b/ext/fileinfo/tests/finfo_extension_flag.phpt
index fdecef31ee..2348558298 100644
--- a/ext/fileinfo/tests/finfo_extension_flag.phpt
+++ b/ext/fileinfo/tests/finfo_extension_flag.phpt
@@ -15,4 +15,3 @@ var_dump($f->file(dirname(__FILE__) . "/resources/test.jpg", FILEINFO_EXTENSION)
--EXPECT--
string(17) "jpeg/jpg/jpe/jfif"
===DONE===
-
diff --git a/ext/fileinfo/tests/finfo_open_002.phpt b/ext/fileinfo/tests/finfo_open_002.phpt
index 3a3891d72c..744773b550 100644
--- a/ext/fileinfo/tests/finfo_open_002.phpt
+++ b/ext/fileinfo/tests/finfo_open_002.phpt
@@ -13,5 +13,3 @@ echo "done!\n";
?>
--EXPECT--
done!
-
-