File tree 4 files changed +15
-17
lines changed
4 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ zend_test.limit_copy_file_range=3584
16
16
/* Note: the value 3584 is chosen so that the mmap in _php_stream_copy_to_stream_ex() will mmap
17
17
* at an offset of a multiple of 4096, which is the standard page size in most Linux systems. */
18
18
$ archive = new PharData (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar ' );
19
- var_dump ($ archive ->extractTo (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' , ['testfile ' ]));
20
- var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' . DIRECTORY_SEPARATOR . 'testfile ' ));
19
+ var_dump ($ archive ->extractTo (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_001 ' , ['testfile ' ]));
20
+ var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_001 ' . DIRECTORY_SEPARATOR . 'testfile ' ));
21
21
?>
22
22
--EXPECT--
23
23
bool(true)
24
24
string(40) "a723ae4ec7eababff73ca961a771b794be6388d2"
25
25
--CLEAN--
26
26
<?php
27
- @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' . DIRECTORY_SEPARATOR . 'testfile ' );
28
- @rmdir (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' );
27
+ @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_001 ' . DIRECTORY_SEPARATOR . 'testfile ' );
28
+ @rmdir (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_001 ' );
29
29
?>
Original file line number Diff line number Diff line change @@ -15,16 +15,16 @@ zend_test.limit_copy_file_range=4096
15
15
/* Note: the value 4096 is chosen so that the mmap in _php_stream_copy_to_stream_ex() will mmap
16
16
* at an offset of a multiple of 4096, which is the standard page size in most Linux systems. */
17
17
$ input_file = fopen (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar ' , 'r ' );
18
- file_put_contents (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out .tar ' , $ input_file );
18
+ file_put_contents (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_002_out .tar ' , $ input_file );
19
19
fclose ($ input_file );
20
20
21
21
var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar ' ));
22
- var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out .tar ' ));
22
+ var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_002_out .tar ' ));
23
23
?>
24
24
--EXPECT--
25
25
string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d"
26
26
string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d"
27
27
--CLEAN--
28
28
<?php
29
- @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out .tar ' );
29
+ @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_002_out .tar ' );
30
30
?>
Original file line number Diff line number Diff line change @@ -14,23 +14,23 @@ zend_test.limit_copy_file_range=3584
14
14
<?php
15
15
/* Note: the value 3584 is chosen so that the mmap in _php_stream_copy_to_stream_ex() will mmap
16
16
* at an offset of a multiple of 4096, which is the standard page size in most Linux systems. */
17
- mkdir (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' );
17
+ mkdir (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_003 ' );
18
18
19
19
$ input = fopen (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar ' , 'r ' );
20
- $ output = fopen (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' . DIRECTORY_SEPARATOR . 'testfile ' , 'w ' );
20
+ $ output = fopen (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_003 ' . DIRECTORY_SEPARATOR . 'testfile ' , 'w ' );
21
21
22
22
var_dump (stream_copy_to_stream ($ input , $ output , 10240 , 0x200 ));
23
23
24
24
fclose ($ input );
25
25
fclose ($ output );
26
26
27
- var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' . DIRECTORY_SEPARATOR . 'testfile ' ));
27
+ var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_003 ' . DIRECTORY_SEPARATOR . 'testfile ' ));
28
28
?>
29
29
--EXPECT--
30
30
int(10240)
31
31
string(40) "a723ae4ec7eababff73ca961a771b794be6388d2"
32
32
--CLEAN--
33
33
<?php
34
- @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' . DIRECTORY_SEPARATOR . 'testfile ' );
35
- @rmdir (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' );
34
+ @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_003 ' . DIRECTORY_SEPARATOR . 'testfile ' );
35
+ @rmdir (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_003 ' );
36
36
?>
Original file line number Diff line number Diff line change @@ -15,24 +15,22 @@ zend_test.limit_copy_file_range=4096
15
15
/* Note: the value 4096 is chosen so that the mmap in _php_stream_copy_to_stream_ex() will mmap
16
16
* at an offset of a multiple of 4096, which is the standard page size in most Linux systems. */
17
17
18
- mkdir (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370 ' );
19
-
20
18
$ input = fopen (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar ' , 'r ' );
21
- $ output = fopen (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out .tar ' , 'w ' );
19
+ $ output = fopen (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_004_out .tar ' , 'w ' );
22
20
23
21
var_dump (stream_copy_to_stream ($ input , $ output ));
24
22
25
23
fclose ($ input );
26
24
fclose ($ output );
27
25
28
26
var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370.tar ' ));
29
- var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out .tar ' ));
27
+ var_dump (sha1_file (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_004_out .tar ' ));
30
28
?>
31
29
--EXPECT--
32
30
int(11776)
33
31
string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d"
34
32
string(40) "edcad8cd6c276f5e318c826ad77a5604d6a6e93d"
35
33
--CLEAN--
36
34
<?php
37
- @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_out .tar ' );
35
+ @unlink (__DIR__ . DIRECTORY_SEPARATOR . 'gh10370_004_out .tar ' );
38
36
?>
You can’t perform that action at this time.
0 commit comments