Skip to content

Commit d679f02

Browse files
committed
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
1 parent e84662c commit d679f02

File tree

3,401 files changed

+1530
-4009
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,401 files changed

+1530
-4009
lines changed

Zend/tests/033.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ $arr[][]->bar = 2;
1717

1818
?>
1919
--EXPECTF--
20-
2120
Notice: Undefined variable: arr in %s on line %d
2221

2322
Notice: Undefined variable: arr in %s on line %d

Zend/tests/abstract-static.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ abstract class TestClass
99
?>
1010
===DONE===
1111
--EXPECT--
12-
1312
===DONE===

Zend/tests/add_006.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ var_dump($c);
3838
echo "Done\n";
3939
?>
4040
--EXPECTF--
41-
4241
Warning: A non-numeric value encountered in %s on line %d
4342
int(75636)
4443

Zend/tests/add_007.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ var_dump($c);
1919
echo "Done\n";
2020
?>
2121
--EXPECTF--
22-
2322
Warning: A non-numeric value encountered in %s on line %d
2423

2524
Exception: Unsupported operand types

Zend/tests/anon/001.phpt

-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ var_dump(new class{});
66
--EXPECTF--
77
object(class@%s)#%d (0) {
88
}
9-
10-

Zend/tests/anon/002.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ var_dump($a instanceof A, $a instanceof B);
1818
--EXPECT--
1919
bool(true)
2020
bool(true)
21-

Zend/tests/anon/003.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ object(class@%s)#1 (1) {
5151
["i"]=>
5252
int(10)
5353
}
54-

Zend/tests/anon/006.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ namespace {
1212
--EXPECTF--
1313
object(class@%s)#1 (0) {
1414
}
15-

Zend/tests/anon/007.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ namespace lone {
2020
--EXPECTF--
2121
object(class@%s)#2 (0) {
2222
}
23-

Zend/tests/assert/expect_013.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ assert.exception=1
88
var_dump(assert(false));
99
?>
1010
--EXPECT--
11-
bool(true)
11+
bool(true)

Zend/tests/assert/expect_014.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ assert(false);
99
var_dump(true);
1010
?>
1111
--EXPECT--
12-
bool(true)
12+
bool(true)

Zend/tests/bug26010.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ array(1) {
1616
["public"]=>
1717
string(6) "public"
1818
}
19-

Zend/tests/bug26696.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ for ($i = 0; $i < $len; $i++) {
1919
===DONE===
2020
--EXPECT--
2121
a-s-d-d-/-?+
22-
===DONE===
22+
===DONE===

Zend/tests/bug29896.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ GenerateError2("Test2");
2525
#0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11, Array ([A1] => Test1)) called at [%sbug29896.php:11]
2626
#1 GenerateError1(Test1) called at [%sbug29896.php:16]
2727
#2 GenerateError2(Test2) called at [%sbug29896.php:19]
28-

Zend/tests/bug29944.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ switch ($a) {
1313
?>
1414
--EXPECT--
1515
ok
16-

Zend/tests/bug30162.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ object(hariCow)#%d (2) {
5151
["y"]=>
5252
string(1) "y"
5353
}
54-
===DONE===
54+
===DONE===

Zend/tests/bug30519.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ class test implements a {
77
?>
88
--EXPECTF--
99
Fatal error: Interface 'a' not found in %sbug30519.php on line 2
10-

Zend/tests/bug32596.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ echo "this is still executed\n";
2424
BUG
2525
please fix this thing, it wasted a nice part of my life!
2626
this is still executed
27-

Zend/tests/bug33318.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ throw 1;
88
Fatal error: Uncaught Error: Can only throw objects in %sbug33318.php:2
99
Stack trace:
1010
#0 {main}
11-
thrown in %sbug33318.php on line 2
11+
thrown in %sbug33318.php on line 2

Zend/tests/bug33558.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ echo "$a\n";
1818
?>
1919
--EXPECT--
2020
ok
21-

Zend/tests/bug34062.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ try {
2121
(((
2222
here
2323
)))
24-

Zend/tests/bug34064.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ Stack trace:
3636
#0 %s(%d): XmlTest->run()
3737
#1 {main}
3838
thrown in %sbug34064.php on line 18
39-

Zend/tests/bug34199.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ if(!$kids) echo "ok\n"; else echo "bug\n";
1515
bool(false)
1616
ok
1717
ok
18-

Zend/tests/bug34879.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ print_r(str_replace('a', 'b', array(-1 =>-1)));
88
Array
99
(
1010
[-1] => -1
11-
)
11+
)

Zend/tests/bug36071.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ $a[0]->b = 0;
1111
Fatal error: Uncaught Error: __clone method called on non-object in %sbug36071.php:2
1212
Stack trace:
1313
#0 {main}
14-
thrown in %sbug36071.php on line 2
14+
thrown in %sbug36071.php on line 2

Zend/tests/bug37138.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ stch::g ();
1818
EHLO
1919
EHLO
2020
EHLO
21-

Zend/tests/bug37707.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ echo "NO LEAK\n";
1313
--EXPECT--
1414
clonned
1515
NO LEAK
16-

Zend/tests/bug38808.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ echo $current($a)."\n";
1414
?>
1515
--EXPECT--
1616
one
17-
two
17+
two

Zend/tests/bug41401.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ echo "\n";
77
echo 6/+2*-3;
88
--EXPECT--
99
-2.5
10-
-9
10+
-9

Zend/tests/bug42143.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ bool(false)
3535
bool(true)
3636
bool(true)
3737
bool(false)
38-

Zend/tests/bug42818.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ Fatal error: Uncaught Error: __clone method called on non-object in %sbug42818.p
99
Stack trace:
1010
#0 {main}
1111
thrown in %sbug42818.php on line 2
12-

Zend/tests/bug42820.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ bool(true)
2828
bool(false)
2929
bool(false)
3030
bool(false)
31-

Zend/tests/bug43183.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ class Bar {}
99
use Test\Bar;
1010
echo "ok\n";
1111
--EXPECT--
12-
ok
12+
ok

Zend/tests/bug43200.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ Class [ <user> class x extends c implements a, b ] {
4848
}
4949
}
5050
}
51-

Zend/tests/bug45180.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ string(1) "C"
5858
__callstatic:
5959
string(3) "FOO"
6060
__callstatic:
61-
string(3) "FOO"
61+
string(3) "FOO"

Zend/tests/bug45862.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ $child->test();
2828

2929
?>
3030
--EXPECT--
31-
3231
From parent scope
3332
array(1) {
3433
["prot"]=>

Zend/tests/bug46811.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ var_dump(ini_get("arg_separator.output"));
1010
--EXPECT--
1111
bool(false)
1212
string(1) "&"
13-

Zend/tests/bug47109.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ $a->{"a"."b"};
88
Notice: Undefined variable: a in %sbug47109.php on line 2
99

1010
Notice: Trying to get property 'ab' of non-object in %sbug47109.php on line 2
11-

Zend/tests/bug48228.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ $l_aa=new aa();
2323
$l_aa->dosome();
2424
?>
2525
--EXPECTF--
26-
2726
Fatal error: Uncaught Exception in %s
2827
Stack trace:
2928
#0 %s(%d): do_throw()

Zend/tests/bug48408.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ catch(Exception $e){
2222
}
2323
?>
2424
--EXPECTF--
25-
2625
Fatal error: Uncaught Exception in %s
2726
Stack trace:
2827
#0 %s(%d): C->generate(0)

Zend/tests/bug50394.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ var_dump($arg);
2121
bar called!
2222
bar called!
2323
int(3)
24-

Zend/tests/bug51176.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ $foo->start();
2929
--EXPECT--
3030
instance
3131
instance
32-
instance
32+
instance

Zend/tests/bug52237.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ preg_match('//', '', $data->info);
77
var_dump($data);
88
?>
99
--EXPECTF--
10-
1110
Warning: Attempt to modify property 'info' of non-object in %sbug52237.php on line 3
1211
string(4) "test"

Zend/tests/bug52361.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ Stack trace:
3232
Stack trace:
3333
#0 %sbug52361.php(16): bbb()
3434
#1 {main}
35-

Zend/tests/bug53971.phpt

-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ var_dump(isset($s[0][0]));
77
?>
88
--EXPECT--
99
bool(false)
10-
11-

Zend/tests/bug54265.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ echo "ok\n";
1414
--EXPECT--
1515
EROOR: Creating default object from empty value
1616
ok
17-

Zend/tests/bug60536_001.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ $a->__construct();
2222
echo "DONE";
2323
?>
2424
--EXPECTF--
25-
2625
Notice: Undefined property: Z::$x in %s on line 14
2726
DONE

Zend/tests/bug60738_variation.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ Fatal error: Uncaught Exception: Exception! in %s:%d
2020
Stack trace:
2121
#0 {main}
2222
thrown in %s on line %d
23-

Zend/tests/bug60833.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ object(B)#%d (4) {
3737
["v4"]=>
3838
string(1) "B"
3939
}
40-

Zend/tests/bug61970_1.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ abstract class Foo {
1010
class Bar extends Foo {
1111
protected function __construct(){}
1212
}
13-
1413
--EXPECTF--
1514
Fatal error: Access level to Bar::__construct() must be public (as in class Foo) in %s

Zend/tests/bug61970_2.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ class Bar extends Foo {
1414
class Baz extends Bar {
1515
protected function __construct(){}
1616
}
17-
1817
--EXPECTF--
1918
Fatal error: Access level to Baz::__construct() must be public (as in class Bar) in %s

Zend/tests/bug62441.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ namespace ns {
1717
?>
1818
--EXPECTF--
1919
Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d
20-

Zend/tests/bug63111.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ Fatal error: Uncaught Error: Cannot call abstract method Foo::bar() in %sbug6311
3535
Stack trace:
3636
#0 {main}
3737
thrown in %sbug63111.php on line 20
38-

Zend/tests/bug63462.phpt

-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ $test->protectedProperty = 'value';
4949
$test->privateProperty = 'value';
5050

5151
?>
52-
5352
--EXPECTF--
5453
__get nonExisting
5554

@@ -71,4 +70,3 @@ __set nonExisting
7170
__set publicProperty
7271
__set protectedProperty
7372
__set privateProperty
74-

Zend/tests/bug63468.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ $x = new Bar;
2727
var_dump($x->run());
2828
--EXPECT--
2929
string(3) "Bar"
30-

Zend/tests/bug63762.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ Warning: Value for function is no string in %s on line %d
5050
Warning: args element is no array in %s on line %d
5151
string(60) "#0 [unknown function][unknown][unknown][unknown]()
5252
#1 {main}"
53-

Zend/tests/bug64417.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ $o['x'] = 1;
3636
echo $o['x'], "\n";
3737
--EXPECT--
3838
2
39-

Zend/tests/bug64660.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ function a() {
77
}
88
echo "Done\n";
99
--EXPECTF--
10-
1110
Parse error: memory exhausted in %s on line %d

Zend/tests/bug65419.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ ghi::def();
2020
?>
2121
--EXPECT--
2222
ghi
23-
ghi
23+
ghi

Zend/tests/bug67436/bug67436.phpt

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
--TEST--
22
bug67436: Autoloader isn't called if user defined error handler is present
3-
43
--INI--
54
error_reporting=-1
6-
75
--FILE--
86
<?php
97

@@ -20,7 +18,6 @@ a::staticTest();
2018

2119
$b = new b();
2220
$b->test();
23-
2421
--EXPECT--
2522
b::test()
2623
a::test(c::TESTCONSTANT)

Zend/tests/bug67436/bug67436_nohandler.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ a::staticTest();
1313

1414
$b = new b();
1515
$b->test();
16-
1716
--EXPECTF--
1817
Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.inc on line %d
1918
b::test()

Zend/tests/bug68446.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ Stack trace:
3737
#0 %s(%d): a(NULL)
3838
#1 {main}
3939
thrown in %s on line %d
40-

Zend/tests/bug69092.2.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ echo "Bye"
1515
--EXPECTF--
1616
Warning: declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in %s on line %d
1717

18-
Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d
18+
Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d

0 commit comments

Comments
 (0)