Skip to content

Commit 902de2c

Browse files
committed
Attempt to bless tests (ext/standard/tests/file)
I'm applying the needed test output changes to a limited set of tests to see what needs to be changed with bless, and what output needs to be fixed with bless. Some issues I remember fixing: - the fscanf tests pass format strings that now become visible as function parameters in the expect section, so i had to manually change these to %s - some tests have output that could be either, bless changed to only the specific output i got (change it back) - some cases of filenames outside the function params occuring that bless missed, cleaned those up
1 parent 8ec16f9 commit 902de2c

File tree

121 files changed

+964
-964
lines changed

Some content is hidden

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

121 files changed

+964
-964
lines changed

ext/standard/tests/file/005_error.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ echo "\nDone";
1818
*** Testing error conditions ***
1919

2020
-- Testing with Non-existing files --
21-
Warning: fileatime(): stat failed for /no/such/file/or/dir in %s on line %d
21+
Warning: fileatime('%s'): stat failed for /no/such/file/or/dir in %s on line %d
2222
bool(false)
2323

24-
Warning: filemtime(): stat failed for /no/such/file/or/dir in %s on line %d
24+
Warning: filemtime('%s'): stat failed for /no/such/file/or/dir in %s on line %d
2525
bool(false)
2626

27-
Warning: filectime(): stat failed for /no/such/file/or/dir in %s on line %d
27+
Warning: filectime('%s'): stat failed for /no/such/file/or/dir in %s on line %d
2828
bool(false)
2929

30-
Warning: touch(): Unable to create file /no/such/file/or/dir because No such file or directory in %s on line %d
30+
Warning: touch('%s', 10): Unable to create file /no/such/file/or/dir because No such file or directory in %s on line %d
3131
bool(false)
3232

3333
Done

ext/standard/tests/file/006_error.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ echo "\n*** Done ***\n";
3232
--EXPECTF--
3333
*** Testing error conditions for fileperms(), chmod() ***
3434

35-
Warning: chmod(): %s in %s on line %d
35+
Warning: chmod('/etc/passwd', 511): Operation not permitted in %s on line %d
3636
bool(false)
3737
100%d44
3838

39-
Warning: chmod(): %s in %s on line %d
39+
Warning: chmod('/etc', 511): Operation not permitted in %s on line %d
4040
bool(false)
4141
40755
4242

43-
Warning: chmod(): No such file or directory in %s on line %d
43+
Warning: chmod('%s', 511): No such file or directory in %s on line %d
4444
bool(false)
4545

46-
Warning: fileperms(): stat failed for /no/such/file/dir in %s on line %d
46+
Warning: fileperms('%s'): stat failed for /no/such/file/dir in %s on line %d
4747
bool(false)
4848

4949

ext/standard/tests/file/007_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ string(20) "line
3838
line of text
3939
li"
4040

41-
Notice: fwrite(): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
41+
Notice: fwrite(Resource id #%d, 'abcdefghij\nmnop...'): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
4242
bool(false)
4343
bool(true)
4444
string(7) "Unknown"

ext/standard/tests/file/007_variation11.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int(0)
5656
int(37)
5757
int(37)
5858

59-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
59+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
6060
bool(false)
6161
int(0)
6262
bool(true)

ext/standard/tests/file/007_variation13.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ resource(%d) of type (stream)
4646
string(6) "stream"
4747
int(37)
4848

49-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
49+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5050
bool(false)
5151
int(0)
5252
bool(true)

ext/standard/tests/file/007_variation15.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int(0)
4848
int(37)
4949
int(37)
5050

51-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
51+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5252
bool(false)
5353
int(0)
5454
bool(true)

ext/standard/tests/file/007_variation17.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ string(20) "line
3838
line of text
3939
li"
4040

41-
Notice: fwrite(): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
41+
Notice: fwrite(Resource id #%d, 'abcdefghij\nmnop...'): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
4242
bool(false)
4343
bool(true)
4444
string(7) "Unknown"

ext/standard/tests/file/007_variation19.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int(0)
5151
int(37)
5252
int(37)
5353

54-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
54+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5555
bool(false)
5656
int(0)
5757
bool(true)

ext/standard/tests/file/007_variation21.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ resource(%d) of type (stream)
4141
string(6) "stream"
4242
int(37)
4343

44-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
44+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
4545
bool(false)
4646
int(0)
4747
bool(true)

ext/standard/tests/file/007_variation23.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int(0)
3939
int(37)
4040
int(37)
4141

42-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
42+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
4343
bool(false)
4444
int(0)
4545
bool(true)

ext/standard/tests/file/007_variation3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int(0)
5151
int(37)
5252
int(37)
5353

54-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
54+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5555
bool(false)
5656
int(0)
5757
bool(true)

ext/standard/tests/file/007_variation5.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ resource(%d) of type (stream)
4141
string(6) "stream"
4242
int(37)
4343

44-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
44+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
4545
bool(false)
4646
int(0)
4747
bool(true)

ext/standard/tests/file/007_variation7.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int(0)
3939
int(37)
4040
int(37)
4141

42-
Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
42+
Notice: fread(Resource id #%d, 100): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
4343
bool(false)
4444
int(0)
4545
bool(true)

ext/standard/tests/file/007_variation9.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ string(20) "line
3838
line of text
3939
li"
4040

41-
Notice: fwrite(): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
41+
Notice: fwrite(Resource id #%d, 'abcdefghij\nmnop...'): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
4242
bool(false)
4343
bool(true)
4444
string(7) "Unknown"

ext/standard/tests/file/bug35781.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var_dump(file_get_contents($filename));
1919
echo "Done\n";
2020
?>
2121
--EXPECTF--
22-
Notice: fpassthru(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
22+
Notice: fpassthru(Resource id #%d): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
2323
string(15) "Guvf vf n grfg
2424
"
2525
Done

ext/standard/tests/file/bug43353.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ bool(false)
1616
bool(false)
1717
string(3) "foo"
1818

19-
Warning: file_get_contents(datafoo:text/plain,foo): Failed to open stream: No such file or directory in %s
19+
Warning: file_get_contents('datafoo:text/pl...'): Failed to open stream: No such file or directory in %s on line %d
2020
bool(false)

ext/standard/tests/file/bug45303.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ var_dump(fseek($fd, 1024*1024, SEEK_SET));
99
--EXPECTF--
1010
resource(%d) of type (stream)
1111

12-
Warning: fseek(): Stream does not support seeking in %s
12+
Warning: fseek(Resource id #%d, 1048576, 0): Stream does not support seeking in %s on line %d
1313
int(-1)

ext/standard/tests/file/bug52624.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ echo tempnam("directory_that_not_exists", "prefix_");
99

1010
?>
1111
--EXPECTF--
12-
Notice: tempnam(): file created in the system's temporary directory in %sbug52624.php on line %d
12+
Notice: tempnam('directory_that_...', 'prefix_'): file created in the system's temporary directory in %s on line %d
1313

14-
Warning: tempnam(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d
14+
Warning: tempnam('directory_that_...', 'prefix_'): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d

ext/standard/tests/file/bug71287.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ stream_wrapper_register('test', Stream::class);
1818
file_put_contents('test://file.txt', 'foobarbaz');
1919
?>
2020
--EXPECTF--
21-
Warning: file_put_contents(): Only 7 of 9 bytes written, possibly out of free disk space in %sbug71287.php on line %d
21+
Warning: file_put_contents('test://file.txt', 'foobarbaz'): Only 7 of 9 bytes written, possibly out of free disk space in %s on line %d

ext/standard/tests/file/chgrp.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
}
1515
?>
1616
--EXPECTF--
17-
Warning: chgrp(): No such file or directory in %s on line %d
17+
Warning: chgrp('sjhgfskhagkfdgs...', 0): No such file or directory in %s on line %d

ext/standard/tests/file/chmod_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ var_dump(chmod($filename, 0777));
1212
--EXPECTF--
1313
*** Testing chmod() : error conditions ***
1414

15-
Warning: chmod(): No such file or directory in %s on line %d
15+
Warning: chmod('___nonExisiting...', 511): No such file or directory in %s on line %d
1616
bool(false)

ext/standard/tests/file/chmod_variation2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bool(true)
7070
chmod() on a path containing .. with invalid directories
7171
bool(true)
7272

73-
Warning: chmod(): No such file or directory in %s on line %d
73+
Warning: chmod('./chmod_variati...', 493): No such file or directory in %s on line %d
7474
bool(false)
7575
777
7676

ext/standard/tests/file/chown.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ chown("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", 0);
1111
echo "ALIVE\n";
1212
?>
1313
--EXPECTF--
14-
Warning: chown(): No such file or directory in %s on line %d
14+
Warning: chown('sjhgfskhagkfdgs...', 0): No such file or directory in %s on line %d
1515
ALIVE

ext/standard/tests/file/copy_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ echo "*** Done ***\n";
1111
--EXPECTF--
1212
*** Testing copy() function: error conditions --
1313

14-
Warning: copy(/no/file): Failed to open stream: No such file or directory in %s on line %d
14+
Warning: copy('/no/file', 'file'): Failed to open stream: No such file or directory in %s on line %d
1515
bool(false)
1616
*** Done ***

ext/standard/tests/file/copy_variation12.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ rmdir(__DIR__."/copy_variation12");
3333
--EXPECTF--
3434
*** Test copy() function: Trying to create a copy of an existing dir ***
3535

36-
Warning: copy(): The first argument to copy() function cannot be a directory in %scopy_variation12.php on line %d
36+
Warning: copy('%s'): The first argument to copy() function cannot be a directory in %s on line %d
3737
bool(false)
3838
bool(false)
3939
int(%d)
4040

41-
Warning: filesize(): stat failed for %scopy_copy_variation12 in %scopy_variation12.php on line %d
41+
Warning: filesize('%s'): stat failed for %scopy_copy_variation12 in %s on line %d
4242
bool(false)
4343
*** Done ***

ext/standard/tests/file/copy_variation13.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ rmdir(__DIR__."/copy_variation13");
3737
*** Test copy() function: Trying to copy dir to file ***
3838
*** Testing copy() in copying dir to file ***
3939

40-
Warning: copy(): The first argument to copy() function cannot be a directory in %scopy_variation13.php on line %d
40+
Warning: copy('%s'): The first argument to copy() function cannot be a directory in %s on line %d
4141
bool(false)
4242
bool(true)
4343
bool(true)

ext/standard/tests/file/copy_variation4.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Size of the source file before copy operation => int(1500)
8484
-- Iteration 1 --
8585
Existence of destination file before copy => bool(true)
8686
Copy operation =>
87-
Warning: copy(): The second argument to copy() function cannot be a directory in %s on line %d
87+
Warning: copy('%s'): The second argument to copy() function cannot be a directory in %s on line %d
8888
bool(false)
8989
Existence of destination file => bool(true)
9090
Destination file name => %s/
@@ -96,7 +96,7 @@ Warning: unlink(%s): %s
9696
-- Iteration 2 --
9797
Existence of destination file before copy => bool(true)
9898
Copy operation =>
99-
Warning: copy(): The second argument to copy() function cannot be a directory in %s on line %d
99+
Warning: copy('%s'): The second argument to copy() function cannot be a directory in %s on line %d
100100
bool(false)
101101
Existence of destination file => bool(true)
102102
Destination file name => %s/
@@ -108,7 +108,7 @@ Warning: unlink(%s): %s
108108
-- Iteration 3 --
109109
Existence of destination file before copy => bool(true)
110110
Copy operation =>
111-
Warning: copy(): The second argument to copy() function cannot be a directory in %s on line %d
111+
Warning: copy('%s'): The second argument to copy() function cannot be a directory in %s on line %d
112112
bool(false)
113113
Existence of destination file => bool(true)
114114
Destination file name => %s/
@@ -120,7 +120,7 @@ Warning: unlink(%s): %s
120120
-- Iteration 4 --
121121
Existence of destination file before copy => bool(true)
122122
Copy operation =>
123-
Warning: copy(): The second argument to copy() function cannot be a directory in %s on line %d
123+
Warning: copy('%s'): The second argument to copy() function cannot be a directory in %s on line %d
124124
bool(false)
125125
Existence of destination file => bool(true)
126126
Destination file name => %s/

ext/standard/tests/file/disk.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ var_dump(disk_total_space("/some/path/here"));
2525
echo "Done\n";
2626
?>
2727
--EXPECTF--
28-
Warning: disk_free_space(): No such file or directory in %s on line %d
28+
Warning: disk_free_space('-1'): No such file or directory in %s on line %d
2929
bool(false)
3030

31-
Warning: disk_total_space(): No such file or directory in %s on line %d
31+
Warning: disk_total_space('-1'): No such file or directory in %s on line %d
3232
bool(false)
3333
float(%f)
3434
float(%f)
3535

36-
Warning: disk_free_space(): No such file or directory in %s on line %d
36+
Warning: disk_free_space('/some/path/here'): No such file or directory in %s on line %d
3737
bool(false)
3838

39-
Warning: disk_total_space(): No such file or directory in %s on line %d
39+
Warning: disk_total_space('/some/path/here'): No such file or directory in %s on line %d
4040
bool(false)
4141
Done

ext/standard/tests/file/disk_free_space_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ unlink($file_path."/disk_free_space.tmp");
3030
--EXPECTF--
3131
*** Testing error conditions ***
3232

33-
Warning: disk_free_space(): No such file or directory in %s on line %d
33+
Warning: disk_free_space('%s'): No such file or directory in %s on line %d
3434
bool(false)
3535

36-
Warning: diskfreespace(): No such file or directory in %s on line %d
36+
Warning: diskfreespace('%s'): No such file or directory in %s on line %d
3737
bool(false)
3838
float(%f)
3939
float(%f)

ext/standard/tests/file/disk_total_space_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ unlink($file_path."/disk_total_space.tmp");
2929
--EXPECTF--
3030
*** Testing error conditions ***
3131

32-
Warning: disk_total_space(): No such file or directory in %s on line %d
32+
Warning: disk_total_space('%s'): No such file or directory in %s on line %d
3333
bool(false)
3434
float(%f)
3535

ext/standard/tests/file/fdatasync.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ bool(false)
6767

6868
*** Testing fdatasync(): for non-file stream ***
6969

70-
Warning: fdatasync(): Can't fsync this stream! in %s on line %d
70+
Warning: fdatasync(Resource id #%d): Can't fsync this stream! in %s on line %d
7171
bool(false)
7272

7373
*** Done ***

0 commit comments

Comments
 (0)