Skip to content

Commit 45f7b2b

Browse files
committed
Fix CRLF line-endings in tests
Also fix a single instance of CRLF in ibase_query.c.
1 parent 563a341 commit 45f7b2b

File tree

211 files changed

+11935
-11935
lines changed

Some content is hidden

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

211 files changed

+11935
-11935
lines changed

Zend/tests/bug55509.phpt

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
--TEST--
2-
Bug #55509 (segfault on x86_64 using more than 2G memory)
3-
--SKIPIF--
4-
<?php
5-
if (PHP_INT_SIZE == 4) {
6-
die('skip Not for 32-bits OS');
7-
}
8-
9-
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
10-
if ($zend_mm_enabled === "0") {
11-
die("skip Zend MM disabled");
12-
}
13-
14-
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
15-
// check the available memory
16-
if (PHP_OS == 'Linux') {
17-
$lines = file('/proc/meminfo');
18-
$infos = array();
19-
foreach ($lines as $line) {
20-
$tmp = explode(":", $line);
21-
$index = strtolower($tmp[0]);
22-
$value = (int)ltrim($tmp[1], " ")*1024;
23-
$infos[$index] = $value;
24-
}
25-
$freeMemory = $infos['memfree']+$infos['buffers']+$infos['cached'];
26-
if ($freeMemory < 2100*1024*1024) {
27-
die('skip Not enough memory.');
28-
}
29-
}
30-
elseif (PHP_OS == 'FreeBSD') {
31-
$lines = explode("\n",`sysctl -a`);
32-
$infos = array();
33-
foreach ($lines as $line) {
34-
if(!$line){
35-
continue;
36-
}
37-
$tmp = explode(":", $line);
38-
$index = strtolower($tmp[0]);
39-
$value = trim($tmp[1], " ");
40-
$infos[$index] = $value;
41-
}
42-
$freeMemory = ($infos['vm.stats.vm.v_inactive_count']*$infos['hw.pagesize'])
43-
+($infos['vm.stats.vm.v_cache_count']*$infos['hw.pagesize'])
44-
+($infos['vm.stats.vm.v_free_count']*$infos['hw.pagesize']);
45-
if ($freeMemory < 2100*1024*1024) {
46-
die('skip Not enough memory.');
47-
}
48-
}
49-
?>
50-
--INI--
51-
memory_limit=2100M
52-
--FILE--
53-
<?php
54-
$a1 = str_repeat("1", 1024 * 1024 * 1024 * 0.5);
55-
echo "1\n";
56-
$a2 = str_repeat("2", 1024 * 1024 * 1024 * 0.5);
57-
echo "2\n";
58-
$a3 = str_repeat("3", 1024 * 1024 * 1024 * 0.5);
59-
echo "3\n";
60-
$a4 = str_repeat("4", 1024 * 1024 * 1024 * 0.5);
61-
echo "4\n";
62-
$a5 = str_repeat("5", 1024 * 1024 * 1024 * 0.5);
63-
echo "5\n";
64-
?>
65-
--EXPECTF--
66-
1
67-
2
68-
3
69-
4
70-
71-
Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %sbug55509.php on line %d
1+
--TEST--
2+
Bug #55509 (segfault on x86_64 using more than 2G memory)
3+
--SKIPIF--
4+
<?php
5+
if (PHP_INT_SIZE == 4) {
6+
die('skip Not for 32-bits OS');
7+
}
8+
9+
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
10+
if ($zend_mm_enabled === "0") {
11+
die("skip Zend MM disabled");
12+
}
13+
14+
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
15+
// check the available memory
16+
if (PHP_OS == 'Linux') {
17+
$lines = file('/proc/meminfo');
18+
$infos = array();
19+
foreach ($lines as $line) {
20+
$tmp = explode(":", $line);
21+
$index = strtolower($tmp[0]);
22+
$value = (int)ltrim($tmp[1], " ")*1024;
23+
$infos[$index] = $value;
24+
}
25+
$freeMemory = $infos['memfree']+$infos['buffers']+$infos['cached'];
26+
if ($freeMemory < 2100*1024*1024) {
27+
die('skip Not enough memory.');
28+
}
29+
}
30+
elseif (PHP_OS == 'FreeBSD') {
31+
$lines = explode("\n",`sysctl -a`);
32+
$infos = array();
33+
foreach ($lines as $line) {
34+
if(!$line){
35+
continue;
36+
}
37+
$tmp = explode(":", $line);
38+
$index = strtolower($tmp[0]);
39+
$value = trim($tmp[1], " ");
40+
$infos[$index] = $value;
41+
}
42+
$freeMemory = ($infos['vm.stats.vm.v_inactive_count']*$infos['hw.pagesize'])
43+
+($infos['vm.stats.vm.v_cache_count']*$infos['hw.pagesize'])
44+
+($infos['vm.stats.vm.v_free_count']*$infos['hw.pagesize']);
45+
if ($freeMemory < 2100*1024*1024) {
46+
die('skip Not enough memory.');
47+
}
48+
}
49+
?>
50+
--INI--
51+
memory_limit=2100M
52+
--FILE--
53+
<?php
54+
$a1 = str_repeat("1", 1024 * 1024 * 1024 * 0.5);
55+
echo "1\n";
56+
$a2 = str_repeat("2", 1024 * 1024 * 1024 * 0.5);
57+
echo "2\n";
58+
$a3 = str_repeat("3", 1024 * 1024 * 1024 * 0.5);
59+
echo "3\n";
60+
$a4 = str_repeat("4", 1024 * 1024 * 1024 * 0.5);
61+
echo "4\n";
62+
$a5 = str_repeat("5", 1024 * 1024 * 1024 * 0.5);
63+
echo "5\n";
64+
?>
65+
--EXPECTF--
66+
1
67+
2
68+
3
69+
4
70+
71+
Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %sbug55509.php on line %d

Zend/tests/bug64979.phpt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
--TEST--
2-
Bug #64979 (Wrong behavior of static variables in closure generators)
3-
--FILE--
4-
<?php
5-
6-
function new_closure_gen() {
7-
return function() {
8-
static $foo = 0;
9-
yield ++$foo;
10-
};
11-
}
12-
13-
$closure1 = new_closure_gen();
14-
$closure2 = new_closure_gen();
15-
16-
$gen1 = $closure1();
17-
$gen2 = $closure1();
18-
$gen3 = $closure2();
19-
20-
foreach (array($gen1, $gen2, $gen3) as $gen) {
21-
foreach ($gen as $val) {
22-
var_dump($val);
23-
}
24-
}
25-
26-
?>
27-
--EXPECT--
28-
int(1)
29-
int(2)
30-
int(1)
1+
--TEST--
2+
Bug #64979 (Wrong behavior of static variables in closure generators)
3+
--FILE--
4+
<?php
5+
6+
function new_closure_gen() {
7+
return function() {
8+
static $foo = 0;
9+
yield ++$foo;
10+
};
11+
}
12+
13+
$closure1 = new_closure_gen();
14+
$closure2 = new_closure_gen();
15+
16+
$gen1 = $closure1();
17+
$gen2 = $closure1();
18+
$gen3 = $closure2();
19+
20+
foreach (array($gen1, $gen2, $gen3) as $gen) {
21+
foreach ($gen as $val) {
22+
var_dump($val);
23+
}
24+
}
25+
26+
?>
27+
--EXPECT--
28+
int(1)
29+
int(2)
30+
int(1)

Zend/tests/bug71474.phpt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
--TEST--
2-
Bug #71474: Crash because of VM stack corruption on Magento2
3-
--FILE--
4-
<?php
5-
class foo {
6-
function __call($name, $args) {
7-
$a = $b = $c = $d = $e = $f = 1;
8-
}
9-
}
10-
11-
function test($n, $x) {
12-
// var_dump($n);
13-
if ($n > 0) {
14-
$x->bug();
15-
test($n - 1, $x);
16-
}
17-
}
18-
19-
test(3000, new foo());
20-
echo "OK\n";
21-
?>
22-
--EXPECT--
23-
OK
1+
--TEST--
2+
Bug #71474: Crash because of VM stack corruption on Magento2
3+
--FILE--
4+
<?php
5+
class foo {
6+
function __call($name, $args) {
7+
$a = $b = $c = $d = $e = $f = 1;
8+
}
9+
}
10+
11+
function test($n, $x) {
12+
// var_dump($n);
13+
if ($n > 0) {
14+
$x->bug();
15+
test($n - 1, $x);
16+
}
17+
}
18+
19+
test(3000, new foo());
20+
echo "OK\n";
21+
?>
22+
--EXPECT--
23+
OK

Zend/tests/bug72918.phpt

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
--TEST--
2-
Bug #72918 (negative offset inside a quoted string leads to parse error)
3-
--FILE--
4-
<?php
5-
$array = [-3 => 'foo'];
6-
$string = 'abcde';
7-
8-
echo "$array[-3]\n";
9-
echo "$string[-3]\n";
10-
echo <<<EOT
11-
$array[-3]
12-
$string[-3]
13-
14-
EOT;
15-
?>
16-
===DONE===
17-
--EXPECT--
18-
foo
19-
c
20-
foo
21-
c
22-
===DONE===
1+
--TEST--
2+
Bug #72918 (negative offset inside a quoted string leads to parse error)
3+
--FILE--
4+
<?php
5+
$array = [-3 => 'foo'];
6+
$string = 'abcde';
7+
8+
echo "$array[-3]\n";
9+
echo "$string[-3]\n";
10+
echo <<<EOT
11+
$array[-3]
12+
$string[-3]
13+
14+
EOT;
15+
?>
16+
===DONE===
17+
--EXPECT--
18+
foo
19+
c
20+
foo
21+
c
22+
===DONE===

Zend/tests/str_offset_002.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
--TEST--
2-
string offset 002
3-
--FILE--
4-
<?php
5-
$a = "aaa";
6-
$x = array(&$a[1]);
7-
?>
8-
--EXPECTF--
9-
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sstr_offset_002.php:3
10-
Stack trace:
11-
#0 {main}
12-
thrown in %sstr_offset_002.php on line 3
1+
--TEST--
2+
string offset 002
3+
--FILE--
4+
<?php
5+
$a = "aaa";
6+
$x = array(&$a[1]);
7+
?>
8+
--EXPECTF--
9+
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sstr_offset_002.php:3
10+
Stack trace:
11+
#0 {main}
12+
thrown in %sstr_offset_002.php on line 3
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
--TEST--
2-
Check for problems with case sensitivity in compositions
3-
--FILE--
4-
<?php
5-
error_reporting(E_ALL);
6-
7-
trait A {
8-
public function M1() {}
9-
public function M2() {}
10-
}
11-
12-
trait B {
13-
public function M1() {}
14-
public function M2() {}
15-
}
16-
17-
class MyClass {
18-
use A;
19-
use B;
20-
}
21-
?>
22-
--EXPECTF--
23-
Fatal error: Trait method M1 has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d
1+
--TEST--
2+
Check for problems with case sensitivity in compositions
3+
--FILE--
4+
<?php
5+
error_reporting(E_ALL);
6+
7+
trait A {
8+
public function M1() {}
9+
public function M2() {}
10+
}
11+
12+
trait B {
13+
public function M1() {}
14+
public function M2() {}
15+
}
16+
17+
class MyClass {
18+
use A;
19+
use B;
20+
}
21+
?>
22+
--EXPECTF--
23+
Fatal error: Trait method M1 has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d

0 commit comments

Comments
 (0)