Skip to content

Commit f22fb07

Browse files
committed
Avoid having output_buffering cause this test to improperly fail.
1 parent 1a0b455 commit f22fb07

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/strings/002.phpt

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ Formatted print functions
44
--GET--
55
--FILE--
66
<?php
7-
87
error_reporting(0);
98

9+
$fp = fopen("php://stdout", "w") or die("Arrggsgg!!");
10+
$x = fprintf($fp, "fprintf test 1:%.5s\n", "abcdefghij");
11+
var_dump($x);
12+
fclose($fp);
13+
1014
printf("printf test 1:%s\n", "simple string");
1115
printf("printf test 2:%d\n", 42);
1216
printf("printf test 3:%f\n", 10.0/3);
@@ -41,14 +45,11 @@ printf("printf test 29:%2\$-2d %1\$2d\n", 1, 2);
4145
print("printf test 30:"); printf("%0\$s", 1); print("x\n");
4246
vprintf("vprintf test 1:%2\$-2d %1\$2d\n", array(1, 2));
4347

44-
$fp = fopen("php://stdout", "w") or die("Arrggsgg!!");
45-
$x = fprintf($fp, "fprintf test 1:%.5s\n", "abcdefghij");
46-
var_dump($x);
47-
fclose($fp);
48-
4948

5049
?>
5150
--EXPECT--
51+
fprintf test 1:abcde
52+
int(20)
5253
printf test 1:simple string
5354
printf test 2:42
5455
printf test 3:3.333333
@@ -82,5 +83,3 @@ printf test 28:02 1
8283
printf test 29:2 1
8384
printf test 30:x
8485
vprintf test 1:2 1
85-
fprintf test 1:abcde
86-
int(20)

0 commit comments

Comments
 (0)