@@ -6,6 +6,7 @@ Bug #69900 Commandline input/output weird behaviour with STDIO
6
6
error_reporting (E_ALL );
7
7
8
8
$ fl = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "test69900.php " ;
9
+ $ max_ms = ((bool )getenv ('TRAVIS ' )) ? 3 : 1 ;
9
10
10
11
$ test_content = '<?php
11
12
@@ -33,7 +34,7 @@ for($i = 0; $i < 10; $i++){
33
34
$ t1 = microtime (1 );
34
35
35
36
echo $ s ;
36
- echo "fgets() took " , (($ t1 - $ t0 )*1000 > 1 ? 'more ' : 'less ' ), " than 1 ms \n" ;
37
+ echo "fgets() took " , (($ t1 - $ t0 )*1000 > $ max_ms ? 'more ' : 'less ' ), " than $ max_ms ms \n" ;
37
38
}
38
39
39
40
fclose ($ pipes [0 ]);
@@ -48,25 +49,25 @@ proc_close($process);
48
49
$ fl = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "test69900.php " ;
49
50
@unlink ($ fl );
50
51
?>
51
- --EXPECT --
52
+ --EXPECTF --
52
53
hello0
53
- fgets() took more than 1 ms
54
+ fgets() took more than %d ms
54
55
hello1
55
- fgets() took less than 1 ms
56
+ fgets() took less than %d ms
56
57
hello2
57
- fgets() took less than 1 ms
58
+ fgets() took less than %d ms
58
59
hello3
59
- fgets() took less than 1 ms
60
+ fgets() took less than %d ms
60
61
hello4
61
- fgets() took less than 1 ms
62
+ fgets() took less than %d ms
62
63
hello5
63
- fgets() took less than 1 ms
64
+ fgets() took less than %d ms
64
65
hello6
65
- fgets() took less than 1 ms
66
+ fgets() took less than %d ms
66
67
hello7
67
- fgets() took less than 1 ms
68
+ fgets() took less than %d ms
68
69
hello8
69
- fgets() took less than 1 ms
70
+ fgets() took less than %d ms
70
71
hello9
71
- fgets() took less than 1 ms
72
+ fgets() took less than %d ms
72
73
===DONE===
0 commit comments