From c4dd7a1a684490673e25aaf4fabec5df138854c4 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 14 Mar 2013 05:42:27 +0000 Subject: Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2. --- ext/standard/tests/file/001-win32.phpt | 100 + ext/standard/tests/file/001.phpt | 146 ++ ext/standard/tests/file/002.phpt | 52 + ext/standard/tests/file/003.phpt | 41 + ext/standard/tests/file/004.phpt | 61 + ext/standard/tests/file/005_basic.phpt | 54 + ext/standard/tests/file/005_error.phpt | 126 + ext/standard/tests/file/005_variation-win32.phpt | 221 ++ ext/standard/tests/file/005_variation.phpt | 260 ++ ext/standard/tests/file/005_variation2-win32.phpt | 119 + ext/standard/tests/file/005_variation2.phpt | 113 + ext/standard/tests/file/006_basic.phpt | 58 + ext/standard/tests/file/006_error.phpt | 107 + ext/standard/tests/file/006_variation1.phpt | 2627 ++++++++++++++++++++ ext/standard/tests/file/006_variation2.phpt | 186 ++ ext/standard/tests/file/007_basic.phpt | 412 +++ ext/standard/tests/file/007_error.phpt | 185 ++ ext/standard/tests/file/007_variation1.phpt | 54 + ext/standard/tests/file/007_variation10.phpt | 58 + ext/standard/tests/file/007_variation11-win32.phpt | 76 + ext/standard/tests/file/007_variation11.phpt | 76 + ext/standard/tests/file/007_variation12-win32.phpt | 78 + ext/standard/tests/file/007_variation12.phpt | 78 + ext/standard/tests/file/007_variation13-win32.phpt | 65 + ext/standard/tests/file/007_variation13.phpt | 65 + ext/standard/tests/file/007_variation14.phpt | 62 + ext/standard/tests/file/007_variation15.phpt | 58 + ext/standard/tests/file/007_variation16.phpt | 60 + ext/standard/tests/file/007_variation17.phpt | 54 + ext/standard/tests/file/007_variation18.phpt | 58 + ext/standard/tests/file/007_variation19.phpt | 71 + ext/standard/tests/file/007_variation2.phpt | 58 + ext/standard/tests/file/007_variation20.phpt | 73 + ext/standard/tests/file/007_variation21.phpt | 60 + ext/standard/tests/file/007_variation22.phpt | 62 + ext/standard/tests/file/007_variation23.phpt | 58 + ext/standard/tests/file/007_variation24.phpt | 60 + ext/standard/tests/file/007_variation3.phpt | 71 + ext/standard/tests/file/007_variation4.phpt | 73 + ext/standard/tests/file/007_variation5.phpt | 60 + ext/standard/tests/file/007_variation6.phpt | 62 + ext/standard/tests/file/007_variation7.phpt | 58 + ext/standard/tests/file/007_variation8.phpt | 60 + ext/standard/tests/file/007_variation9.phpt | 54 + ext/standard/tests/file/basename-win32.phpt | 341 +++ ext/standard/tests/file/basename.phpt | Bin 0 -> 8229 bytes ext/standard/tests/file/basename_basic-win32.phpt | 101 + ext/standard/tests/file/basename_basic.phpt | 101 + ext/standard/tests/file/basename_error.phpt | 38 + .../tests/file/basename_variation1-win32.phpt | 238 ++ ext/standard/tests/file/basename_variation1.phpt | 238 ++ .../tests/file/basename_variation2-win32.phpt | 253 ++ ext/standard/tests/file/basename_variation2.phpt | 253 ++ ext/standard/tests/file/basename_variation3.phpt | 185 ++ ext/standard/tests/file/basename_variation4.phpt | 188 ++ ext/standard/tests/file/bug12556.phpt | 48 + ext/standard/tests/file/bug20424.phpt | 10 + ext/standard/tests/file/bug22382.phpt | 25 + ext/standard/tests/file/bug22414.phpt | 38 + ext/standard/tests/file/bug24313.phpt | 16 + ext/standard/tests/file/bug24482.phpt | 37 + ext/standard/tests/file/bug26003.phpt | Bin 0 -> 225 bytes ext/standard/tests/file/bug26615.phpt | 20 + ext/standard/tests/file/bug26938.phpt | 33 + ext/standard/tests/file/bug27508.phpt | 80 + ext/standard/tests/file/bug27619.phpt | 18 + ext/standard/tests/file/bug30362.phpt | 26 + ext/standard/tests/file/bug30362.txt | 1 + ext/standard/tests/file/bug32160.phpt | 14 + ext/standard/tests/file/bug32160.txt | 1 + ext/standard/tests/file/bug35740.phpt | 14 + ext/standard/tests/file/bug35781.phpt | 24 + ext/standard/tests/file/bug37158.phpt | 39 + ext/standard/tests/file/bug37864.phpt | 12 + ext/standard/tests/file/bug38086.phpt | 55 + ext/standard/tests/file/bug38086.txt | 5 + ext/standard/tests/file/bug38450.phpt | 114 + ext/standard/tests/file/bug38450_1.phpt | 114 + ext/standard/tests/file/bug38450_2.phpt | 114 + ext/standard/tests/file/bug38450_3.phpt | 105 + ext/standard/tests/file/bug39367.phpt | 33 + ext/standard/tests/file/bug39538.phpt | 39 + ext/standard/tests/file/bug39551.phpt | 24 + ext/standard/tests/file/bug39673.phpt | 40 + ext/standard/tests/file/bug39863.phpt | 23 + ext/standard/tests/file/bug40374.phpt | 17 + ext/standard/tests/file/bug40501.csv | 2 + ext/standard/tests/file/bug40501.phpt | 20 + ext/standard/tests/file/bug41655_1.phpt | 15 + ext/standard/tests/file/bug41655_2.phpt | 15 + ext/standard/tests/file/bug41693.phpt | 13 + ext/standard/tests/file/bug41815.phpt | 27 + ext/standard/tests/file/bug41874.phpt | 15 + ext/standard/tests/file/bug41874_1.phpt | 16 + ext/standard/tests/file/bug41874_2.phpt | 17 + ext/standard/tests/file/bug41874_3.phpt | 16 + ext/standard/tests/file/bug43008.phpt | 19 + ext/standard/tests/file/bug43137.phpt | 20 + ext/standard/tests/file/bug43216.phpt | 8 + ext/standard/tests/file/bug43248.phpt | 8 + ext/standard/tests/file/bug43353-win32.phpt | 25 + ext/standard/tests/file/bug43353.phpt | 25 + ext/standard/tests/file/bug43522.phpt | 25 + ext/standard/tests/file/bug44034.phpt | 41 + ext/standard/tests/file/bug44607.phpt | 24 + ext/standard/tests/file/bug44805.phpt | 30 + ext/standard/tests/file/bug45181.phpt | 16 + ext/standard/tests/file/bug45303.phpt | 13 + ext/standard/tests/file/bug45985.phpt | 14 + ext/standard/tests/file/bug46347.phpt | 24 + ext/standard/tests/file/bug47767.phpt | 50 + ext/standard/tests/file/bug49047.phpt | 17 + ext/standard/tests/file/bug51094.phpt | 22 + ext/standard/tests/file/bug52624.phpt | 12 + ext/standard/tests/file/bug52820.phpt | 71 + ext/standard/tests/file/bug53241.phpt | 23 + ext/standard/tests/file/bug53848.phpt | 25 + ext/standard/tests/file/bug55124.phpt | 18 + ext/standard/tests/file/bug60120.phpt | 74 + ext/standard/tests/file/bug61961.phpt | 14 + ext/standard/tests/file/bug63512.phpt | 33 + ext/standard/tests/file/chgrp.phpt | 15 + ext/standard/tests/file/chmod_basic-win32.phpt | 545 ++++ ext/standard/tests/file/chmod_basic.phpt | 35 + ext/standard/tests/file/chmod_error.phpt | 47 + ext/standard/tests/file/chmod_variation1.phpt | 34 + .../tests/file/chmod_variation2-win32.phpt | 74 + ext/standard/tests/file/chmod_variation2.phpt | 92 + ext/standard/tests/file/chmod_variation3.phpt | 209 ++ ext/standard/tests/file/chmod_variation4.phpt | 201 ++ ext/standard/tests/file/chown.phpt | 15 + ext/standard/tests/file/chroot_001.phpt | 30 + ext/standard/tests/file/clearstatcache_001.phpt | 43 + ext/standard/tests/file/clearstatcache_error.phpt | 19 + ext/standard/tests/file/copy_basic.phpt | 58 + ext/standard/tests/file/copy_error.phpt | 39 + ext/standard/tests/file/copy_variation1.phpt | 145 ++ ext/standard/tests/file/copy_variation10.phpt | 37 + ext/standard/tests/file/copy_variation11.phpt | 71 + .../tests/file/copy_variation12-win32.phpt | 47 + ext/standard/tests/file/copy_variation12.phpt | 51 + ext/standard/tests/file/copy_variation13.phpt | 57 + ext/standard/tests/file/copy_variation14.phpt | 48 + ext/standard/tests/file/copy_variation15.phpt | 64 + .../tests/file/copy_variation16-win32.phpt | 144 ++ ext/standard/tests/file/copy_variation16.phpt | 143 ++ ext/standard/tests/file/copy_variation17.phpt | 76 + ext/standard/tests/file/copy_variation18.phpt | 56 + ext/standard/tests/file/copy_variation2-win32.phpt | 218 ++ ext/standard/tests/file/copy_variation2.phpt | 237 ++ ext/standard/tests/file/copy_variation3-win32.phpt | 109 + ext/standard/tests/file/copy_variation3.phpt | 110 + ext/standard/tests/file/copy_variation4.phpt | Bin 0 -> 4966 bytes ext/standard/tests/file/copy_variation5-win32.phpt | 111 + ext/standard/tests/file/copy_variation5.phpt | 106 + ext/standard/tests/file/copy_variation6-win32.phpt | 143 ++ ext/standard/tests/file/copy_variation6.phpt | 142 ++ ext/standard/tests/file/copy_variation7.phpt | 86 + ext/standard/tests/file/copy_variation8.phpt | 176 ++ ext/standard/tests/file/copy_variation9.phpt | 75 + .../tests/file/directory_wrapper_fstat_basic.phpt | 13 + ext/standard/tests/file/dirname_basic-win32.phpt | 93 + ext/standard/tests/file/dirname_basic.phpt | 94 + ext/standard/tests/file/dirname_error.phpt | 40 + ext/standard/tests/file/dirname_variation1.phpt | 190 ++ ext/standard/tests/file/disk.phpt | 48 + ext/standard/tests/file/disk_free_space_basic.phpt | 70 + .../tests/file/disk_free_space_error-win32.phpt | 75 + ext/standard/tests/file/disk_free_space_error.phpt | 67 + .../tests/file/disk_free_space_variation.phpt | 139 ++ .../tests/file/disk_total_space_basic.phpt | 48 + .../tests/file/disk_total_space_error-win32.phpt | 56 + .../tests/file/disk_total_space_error.phpt | 52 + .../tests/file/disk_total_space_variation.phpt | 123 + ext/standard/tests/file/fclose_variation1.phpt | 15 + ext/standard/tests/file/feof_basic.phpt | 101 + ext/standard/tests/file/fflush_basic.phpt | 58 + ext/standard/tests/file/fflush_error.phpt | 90 + .../tests/file/fflush_variation1-win32.phpt | 531 ++++ ext/standard/tests/file/fflush_variation1.phpt | 532 ++++ ext/standard/tests/file/fflush_variation2.phpt | 443 ++++ ext/standard/tests/file/fflush_variation3.phpt | 383 +++ ext/standard/tests/file/fflush_variation4.phpt | 53 + ext/standard/tests/file/fgetc_basic.phpt | 543 ++++ ext/standard/tests/file/fgetc_error.phpt | 73 + ext/standard/tests/file/fgetc_variation1.phpt | 94 + ext/standard/tests/file/fgetc_variation2.phpt | 52 + ext/standard/tests/file/fgetc_variation3.phpt | 117 + ext/standard/tests/file/fgetc_variation4.phpt | 290 +++ ext/standard/tests/file/fgetcsv.phpt | 158 ++ ext/standard/tests/file/fgetcsv_error.phpt | 96 + ext/standard/tests/file/fgetcsv_variation1.phpt | 1412 +++++++++++ ext/standard/tests/file/fgetcsv_variation10.phpt | 1295 ++++++++++ ext/standard/tests/file/fgetcsv_variation11.phpt | 1835 ++++++++++++++ ext/standard/tests/file/fgetcsv_variation12.phpt | 957 +++++++ ext/standard/tests/file/fgetcsv_variation13.phpt | 189 ++ ext/standard/tests/file/fgetcsv_variation14.phpt | 239 ++ ext/standard/tests/file/fgetcsv_variation15.phpt | 940 +++++++ ext/standard/tests/file/fgetcsv_variation16.phpt | 944 +++++++ ext/standard/tests/file/fgetcsv_variation17.phpt | 1565 ++++++++++++ ext/standard/tests/file/fgetcsv_variation18.phpt | 690 +++++ ext/standard/tests/file/fgetcsv_variation19.phpt | 841 +++++++ ext/standard/tests/file/fgetcsv_variation2.phpt | 1413 +++++++++++ ext/standard/tests/file/fgetcsv_variation20.phpt | 191 ++ ext/standard/tests/file/fgetcsv_variation21.phpt | 191 ++ ext/standard/tests/file/fgetcsv_variation22.phpt | 614 +++++ ext/standard/tests/file/fgetcsv_variation23.phpt | 48 + ext/standard/tests/file/fgetcsv_variation24.phpt | 671 +++++ ext/standard/tests/file/fgetcsv_variation25.phpt | 935 +++++++ ext/standard/tests/file/fgetcsv_variation26.phpt | 441 ++++ ext/standard/tests/file/fgetcsv_variation27.phpt | 935 +++++++ ext/standard/tests/file/fgetcsv_variation28.phpt | 935 +++++++ ext/standard/tests/file/fgetcsv_variation29.phpt | 615 +++++ ext/standard/tests/file/fgetcsv_variation3.phpt | 933 +++++++ ext/standard/tests/file/fgetcsv_variation30.phpt | 614 +++++ ext/standard/tests/file/fgetcsv_variation31.phpt | 616 +++++ ext/standard/tests/file/fgetcsv_variation4.phpt | 932 +++++++ ext/standard/tests/file/fgetcsv_variation5.phpt | 934 +++++++ ext/standard/tests/file/fgetcsv_variation6.phpt | 2350 +++++++++++++++++ ext/standard/tests/file/fgetcsv_variation7.phpt | 1292 ++++++++++ ext/standard/tests/file/fgetcsv_variation8.phpt | 1058 ++++++++ ext/standard/tests/file/fgetcsv_variation9.phpt | 1056 ++++++++ ext/standard/tests/file/fgets_basic.phpt | 318 +++ ext/standard/tests/file/fgets_error.phpt | 108 + .../tests/file/fgets_socket_variation1.phpt | 56 + .../tests/file/fgets_socket_variation2.phpt | 63 + ext/standard/tests/file/fgets_variation1.phpt | 116 + ext/standard/tests/file/fgets_variation2.phpt | 63 + ext/standard/tests/file/fgets_variation3.phpt | 500 ++++ .../tests/file/fgets_variation4-win32.phpt | 574 +++++ ext/standard/tests/file/fgets_variation4.phpt | 574 +++++ ext/standard/tests/file/fgets_variation5.phpt | 302 +++ .../tests/file/fgets_variation6-win32.phpt | 372 +++ ext/standard/tests/file/fgets_variation6.phpt | 372 +++ ext/standard/tests/file/fgetss.phpt | 83 + ext/standard/tests/file/fgetss1.phpt | 69 + ext/standard/tests/file/fgetss_basic1.phpt | 135 + ext/standard/tests/file/fgetss_basic2-win32.phpt | 216 ++ ext/standard/tests/file/fgetss_basic2.phpt | 214 ++ ext/standard/tests/file/fgetss_error.phpt | 106 + .../tests/file/fgetss_variation1-win32.phpt | 172 ++ ext/standard/tests/file/fgetss_variation1.phpt | 168 ++ ext/standard/tests/file/fgetss_variation2.phpt | 434 ++++ .../tests/file/fgetss_variation3-win32.phpt | 571 +++++ ext/standard/tests/file/fgetss_variation3.phpt | 567 +++++ ext/standard/tests/file/fgetss_variation4.phpt | 168 ++ .../tests/file/fgetss_variation5-win32.phpt | 220 ++ ext/standard/tests/file/fgetss_variation5.phpt | 217 ++ ext/standard/tests/file/file.inc | 650 +++++ ext/standard/tests/file/file_basic.phpt | 77 + ext/standard/tests/file/file_error.phpt | 48 + ext/standard/tests/file/file_exists_error.phpt | 40 + .../tests/file/file_exists_variation1.phpt | 30 + .../tests/file/file_get_contents_basic.phpt | 41 + .../tests/file/file_get_contents_basic001.phpt | 21 + .../tests/file/file_get_contents_error.phpt | 67 + .../tests/file/file_get_contents_error001.phpt | 19 + .../tests/file/file_get_contents_error002.phpt | 18 + .../file_get_contents_file_put_contents_basic.phpt | 50 + .../file_get_contents_file_put_contents_error.phpt | 71 + ..._get_contents_file_put_contents_variation1.phpt | 116 + ..._get_contents_file_put_contents_variation2.phpt | 57 + .../tests/file/file_get_contents_variation1.phpt | 51 + .../tests/file/file_get_contents_variation2.phpt | 52 + .../tests/file/file_get_contents_variation3.phpt | 218 ++ .../tests/file/file_get_contents_variation4.phpt | 251 ++ .../tests/file/file_get_contents_variation5.phpt | 222 ++ .../tests/file/file_get_contents_variation6.phpt | 215 ++ .../file/file_get_contents_variation7-win32.phpt | 115 + .../tests/file/file_get_contents_variation7.phpt | 104 + .../file/file_get_contents_variation8-win32.phpt | 98 + .../tests/file/file_get_contents_variation8.phpt | 88 + .../tests/file/file_get_contents_variation9.phpt | 56 + ext/standard/tests/file/file_put_contents.phpt | 32 + .../tests/file/file_put_contents_variation1.phpt | 43 + .../tests/file/file_put_contents_variation2.phpt | 167 ++ .../tests/file/file_put_contents_variation3.phpt | 250 ++ .../tests/file/file_put_contents_variation4.phpt | 51 + .../tests/file/file_put_contents_variation5.phpt | 51 + .../tests/file/file_put_contents_variation6.phpt | 56 + .../file/file_put_contents_variation7-win32.phpt | 130 + .../tests/file/file_put_contents_variation7.phpt | 119 + .../file/file_put_contents_variation8-win32.phpt | 98 + .../tests/file/file_put_contents_variation8.phpt | Bin 0 -> 2388 bytes .../tests/file/file_put_contents_variation9.phpt | 70 + ext/standard/tests/file/file_variation.phpt | 160 ++ ext/standard/tests/file/file_variation2.phpt | 210 ++ ext/standard/tests/file/file_variation3.phpt | 294 +++ ext/standard/tests/file/file_variation4.phpt | 291 +++ ext/standard/tests/file/file_variation5-win32.phpt | 74 + ext/standard/tests/file/file_variation5.phpt | 94 + ext/standard/tests/file/file_variation6.phpt | 261 ++ ext/standard/tests/file/file_variation7.phpt | 87 + ext/standard/tests/file/file_variation8-win32.phpt | 142 ++ ext/standard/tests/file/file_variation8.phpt | 128 + ext/standard/tests/file/file_variation9.phpt | 89 + ext/standard/tests/file/filegroup_basic.phpt | 69 + ext/standard/tests/file/filegroup_error.phpt | 44 + ext/standard/tests/file/filegroup_variation1.phpt | 47 + ext/standard/tests/file/filegroup_variation2.phpt | 71 + ext/standard/tests/file/filegroup_variation3.phpt | 85 + ext/standard/tests/file/fileinode_basic.phpt | 36 + ext/standard/tests/file/fileinode_error.phpt | 44 + ext/standard/tests/file/fileinode_variation.phpt | 112 + ext/standard/tests/file/fileinode_variation1.phpt | 48 + ext/standard/tests/file/fileinode_variation2.phpt | 72 + ext/standard/tests/file/fileinode_variation3.phpt | 86 + ext/standard/tests/file/fileowner_basic.phpt | 51 + ext/standard/tests/file/fileowner_error.phpt | 44 + ext/standard/tests/file/fileowner_variation1.phpt | 48 + ext/standard/tests/file/fileowner_variation2.phpt | 72 + ext/standard/tests/file/fileowner_variation3.phpt | 86 + ext/standard/tests/file/fileperms_variation1.phpt | 47 + ext/standard/tests/file/fileperms_variation2.phpt | 71 + ext/standard/tests/file/fileperms_variation3.phpt | 85 + ext/standard/tests/file/filesize_basic.phpt | 39 + ext/standard/tests/file/filesize_error.phpt | 41 + .../tests/file/filesize_variation1-win32.phpt | 45 + ext/standard/tests/file/filesize_variation1.phpt | 45 + .../tests/file/filesize_variation2-win32.phpt | 83 + ext/standard/tests/file/filesize_variation2.phpt | 83 + .../tests/file/filesize_variation3-win32.phpt | 70 + ext/standard/tests/file/filesize_variation3.phpt | 70 + .../tests/file/filesize_variation4-win32.phpt | 109 + ext/standard/tests/file/filesize_variation4.phpt | 111 + ext/standard/tests/file/filesize_variation5.phpt | 34 + ext/standard/tests/file/filestat.phpt | 63 + ext/standard/tests/file/filetype_basic.phpt | 22 + ext/standard/tests/file/filetype_error.phpt | 39 + ext/standard/tests/file/filetype_variation.phpt | 78 + ext/standard/tests/file/filetype_variation2.phpt | 29 + ext/standard/tests/file/filetype_variation3.phpt | 29 + ext/standard/tests/file/flock.phpt | 64 + ext/standard/tests/file/flock_basic.phpt | 44 + ext/standard/tests/file/flock_error.phpt | 112 + ext/standard/tests/file/flock_variation.phpt | 371 +++ ext/standard/tests/file/fnmatch_basic.phpt | 49 + ext/standard/tests/file/fnmatch_error.phpt | 57 + ext/standard/tests/file/fnmatch_variation.phpt | 505 ++++ ext/standard/tests/file/fopen_include_path.inc | 92 + ext/standard/tests/file/fopen_variation1.phpt | 14 + .../tests/file/fopen_variation10-win32.phpt | 149 ++ .../tests/file/fopen_variation11-win32.phpt | 147 ++ ext/standard/tests/file/fopen_variation12.phpt | 52 + ext/standard/tests/file/fopen_variation13.phpt | 56 + .../tests/file/fopen_variation14-win32.phpt | 189 ++ ext/standard/tests/file/fopen_variation14.phpt | 134 + .../tests/file/fopen_variation15-win32.phpt | 193 ++ ext/standard/tests/file/fopen_variation15.phpt | 138 + ext/standard/tests/file/fopen_variation16.phpt | 75 + ext/standard/tests/file/fopen_variation17.phpt | 74 + ext/standard/tests/file/fopen_variation19.phpt | 110 + ext/standard/tests/file/fopen_variation3.phpt | 218 ++ ext/standard/tests/file/fopen_variation4.phpt | 251 ++ ext/standard/tests/file/fopen_variation5.phpt | 151 ++ ext/standard/tests/file/fopen_variation6.phpt | 44 + ext/standard/tests/file/fopen_variation7.phpt | 66 + ext/standard/tests/file/fopen_variation8.phpt | 150 ++ ext/standard/tests/file/fopen_variation9.phpt | 66 + ext/standard/tests/file/fopencookie.phpt | 88 + ext/standard/tests/file/fpassthru_basic.phpt | 128 + ext/standard/tests/file/fpassthru_error.phpt | 40 + ext/standard/tests/file/fpassthru_variation.phpt | 114 + ext/standard/tests/file/fpassthru_variation1.phpt | 224 ++ ext/standard/tests/file/fputcsv.phpt | 105 + ext/standard/tests/file/fputcsv_002.phpt | 43 + ext/standard/tests/file/fputcsv_error.phpt | 97 + ext/standard/tests/file/fputcsv_variation1.phpt | 834 +++++++ ext/standard/tests/file/fputcsv_variation10.phpt | 336 +++ ext/standard/tests/file/fputcsv_variation11.phpt | 834 +++++++ ext/standard/tests/file/fputcsv_variation12.phpt | 835 +++++++ ext/standard/tests/file/fputcsv_variation13.phpt | 1051 ++++++++ ext/standard/tests/file/fputcsv_variation14.phpt | 357 +++ ext/standard/tests/file/fputcsv_variation2.phpt | 942 +++++++ ext/standard/tests/file/fputcsv_variation3.phpt | 942 +++++++ ext/standard/tests/file/fputcsv_variation4.phpt | 942 +++++++ ext/standard/tests/file/fputcsv_variation5.phpt | 834 +++++++ ext/standard/tests/file/fputcsv_variation6.phpt | 837 +++++++ ext/standard/tests/file/fputcsv_variation7.phpt | 837 +++++++ ext/standard/tests/file/fputcsv_variation8.phpt | 837 +++++++ ext/standard/tests/file/fputcsv_variation9.phpt | 1268 ++++++++++ ext/standard/tests/file/fread_basic.phpt | 640 +++++ ext/standard/tests/file/fread_error.phpt | 114 + ext/standard/tests/file/fread_fwrite_basic.phpt | 72 + .../tests/file/fread_socket_variation1.phpt | 16 + ext/standard/tests/file/fread_variation1.phpt | 657 +++++ ext/standard/tests/file/fread_variation2.phpt | 656 +++++ .../tests/file/fread_variation3-win32.phpt | 498 ++++ ext/standard/tests/file/fread_variation3.phpt | 498 ++++ .../tests/file/fread_variation4-win32.phpt | 469 ++++ ext/standard/tests/file/fread_variation4.phpt | 469 ++++ ext/standard/tests/file/fscanf.phpt | 100 + ext/standard/tests/file/fscanf_error.phpt | 99 + ext/standard/tests/file/fscanf_variation1.phpt | 50 + ext/standard/tests/file/fscanf_variation10.phpt | 222 ++ ext/standard/tests/file/fscanf_variation11.phpt | 713 ++++++ ext/standard/tests/file/fscanf_variation12.phpt | 946 +++++++ ext/standard/tests/file/fscanf_variation13.phpt | 246 ++ ext/standard/tests/file/fscanf_variation14.phpt | 1079 ++++++++ ext/standard/tests/file/fscanf_variation15.phpt | 863 +++++++ ext/standard/tests/file/fscanf_variation16.phpt | 221 ++ ext/standard/tests/file/fscanf_variation17.phpt | 712 ++++++ ext/standard/tests/file/fscanf_variation18.phpt | 1014 ++++++++ ext/standard/tests/file/fscanf_variation19.phpt | 250 ++ ext/standard/tests/file/fscanf_variation2.phpt | 1008 ++++++++ ext/standard/tests/file/fscanf_variation20.phpt | 1012 ++++++++ ext/standard/tests/file/fscanf_variation21.phpt | 863 +++++++ ext/standard/tests/file/fscanf_variation22.phpt | 221 ++ ext/standard/tests/file/fscanf_variation23.phpt | 712 ++++++ ext/standard/tests/file/fscanf_variation24.phpt | 994 ++++++++ ext/standard/tests/file/fscanf_variation25.phpt | 294 +++ ext/standard/tests/file/fscanf_variation26.phpt | 356 +++ ext/standard/tests/file/fscanf_variation27.phpt | 1013 ++++++++ ext/standard/tests/file/fscanf_variation28.phpt | 863 +++++++ ext/standard/tests/file/fscanf_variation29.phpt | 222 ++ ext/standard/tests/file/fscanf_variation3.phpt | 865 +++++++ ext/standard/tests/file/fscanf_variation30.phpt | 713 ++++++ ext/standard/tests/file/fscanf_variation31.phpt | 946 +++++++ ext/standard/tests/file/fscanf_variation32.phpt | 251 ++ ext/standard/tests/file/fscanf_variation33.phpt | 1019 ++++++++ ext/standard/tests/file/fscanf_variation34.phpt | 869 +++++++ ext/standard/tests/file/fscanf_variation35.phpt | 217 ++ ext/standard/tests/file/fscanf_variation36.phpt | 708 ++++++ ext/standard/tests/file/fscanf_variation37.phpt | 946 +++++++ ext/standard/tests/file/fscanf_variation38.phpt | 246 ++ ext/standard/tests/file/fscanf_variation39.phpt | 1014 ++++++++ ext/standard/tests/file/fscanf_variation4.phpt | 218 ++ ext/standard/tests/file/fscanf_variation40.phpt | 865 +++++++ ext/standard/tests/file/fscanf_variation41.phpt | 217 ++ ext/standard/tests/file/fscanf_variation42.phpt | 708 ++++++ ext/standard/tests/file/fscanf_variation43.phpt | 946 +++++++ ext/standard/tests/file/fscanf_variation44.phpt | 246 ++ ext/standard/tests/file/fscanf_variation45.phpt | 1008 ++++++++ ext/standard/tests/file/fscanf_variation46.phpt | 859 +++++++ ext/standard/tests/file/fscanf_variation47.phpt | 217 ++ ext/standard/tests/file/fscanf_variation48.phpt | 707 ++++++ ext/standard/tests/file/fscanf_variation49.phpt | 946 +++++++ ext/standard/tests/file/fscanf_variation5.phpt | 708 ++++++ ext/standard/tests/file/fscanf_variation50.phpt | 246 ++ ext/standard/tests/file/fscanf_variation51.phpt | 153 ++ ext/standard/tests/file/fscanf_variation52.phpt | 178 ++ ext/standard/tests/file/fscanf_variation53.phpt | 229 ++ ext/standard/tests/file/fscanf_variation54.phpt | 101 + ext/standard/tests/file/fscanf_variation55.phpt | 1691 +++++++++++++ ext/standard/tests/file/fscanf_variation6.phpt | 946 +++++++ ext/standard/tests/file/fscanf_variation7.phpt | 246 ++ ext/standard/tests/file/fscanf_variation8.phpt | 1614 ++++++++++++ ext/standard/tests/file/fscanf_variation9.phpt | 1015 ++++++++ ext/standard/tests/file/fseek_dir_basic.phpt | 96 + .../tests/file/fseek_ftell_rewind_basic1.phpt | 453 ++++ .../file/fseek_ftell_rewind_basic2-win32.phpt | 464 ++++ .../tests/file/fseek_ftell_rewind_basic2.phpt | 463 ++++ .../tests/file/fseek_ftell_rewind_error1.phpt | 99 + .../tests/file/fseek_ftell_rewind_error2.phpt | 95 + .../tests/file/fseek_ftell_rewind_error3.phpt | 95 + .../tests/file/fseek_ftell_rewind_variation1.phpt | 428 ++++ .../file/fseek_ftell_rewind_variation2-win32.phpt | 437 ++++ .../tests/file/fseek_ftell_rewind_variation2.phpt | 437 ++++ .../tests/file/fseek_ftell_rewind_variation3.phpt | 478 ++++ .../file/fseek_ftell_rewind_variation4-win32.phpt | 483 ++++ .../tests/file/fseek_ftell_rewind_variation4.phpt | 483 ++++ .../tests/file/fseek_ftell_rewind_variation5.phpt | 474 ++++ .../file/fseek_ftell_rewind_variation6-win32.phpt | 483 ++++ .../tests/file/fseek_ftell_rewind_variation6.phpt | 483 ++++ .../tests/file/fseek_ftell_rewind_variation7.phpt | 477 ++++ .../file/fseek_ftell_rewind_variation8-win32.phpt | 484 ++++ .../tests/file/fseek_ftell_rewind_variation8.phpt | 484 ++++ ext/standard/tests/file/fseek_variation1.phpt | 198 ++ ext/standard/tests/file/fseek_variation2.phpt | 159 ++ ext/standard/tests/file/fseek_variation3.phpt | 54 + ext/standard/tests/file/fstat.phpt | 74 + ext/standard/tests/file/fstat_basic.phpt | 65 + ext/standard/tests/file/fstat_error.phpt | 22 + ext/standard/tests/file/fstat_variation1.phpt | 34 + ext/standard/tests/file/fstat_variation2.phpt | 31 + ext/standard/tests/file/fstat_variation3.phpt | 42 + ext/standard/tests/file/fstat_variation4.phpt | 35 + ext/standard/tests/file/fstat_variation5.phpt | 31 + ext/standard/tests/file/fstat_variation6.phpt | 46 + ext/standard/tests/file/fstat_variation7.phpt | 35 + ext/standard/tests/file/fstat_variation8.phpt | 33 + ext/standard/tests/file/ftruncate.phpt | Bin 0 -> 1077 bytes ext/standard/tests/file/ftruncate_error.phpt | 124 + .../tests/file/ftruncate_variation1-win32.phpt | 461 ++++ ext/standard/tests/file/ftruncate_variation1.phpt | 461 ++++ .../tests/file/ftruncate_variation2-win32.phpt | 462 ++++ ext/standard/tests/file/ftruncate_variation2.phpt | 462 ++++ .../tests/file/ftruncate_variation3-win32.phpt | 461 ++++ ext/standard/tests/file/ftruncate_variation3.phpt | 461 ++++ .../tests/file/ftruncate_variation4-win32.phpt | 462 ++++ ext/standard/tests/file/ftruncate_variation4.phpt | 462 ++++ .../tests/file/ftruncate_variation5-win32.phpt | 463 ++++ ext/standard/tests/file/ftruncate_variation5.phpt | 463 ++++ .../tests/file/ftruncate_variation6-win32.phpt | 482 ++++ ext/standard/tests/file/ftruncate_variation6.phpt | 482 ++++ .../tests/file/ftruncate_variation7-win32.phpt | 463 ++++ ext/standard/tests/file/ftruncate_variation7.phpt | 463 ++++ ext/standard/tests/file/fwrite.phpt | 52 + ext/standard/tests/file/fwrite_basic-win32.phpt | 424 ++++ ext/standard/tests/file/fwrite_basic.phpt | 424 ++++ ext/standard/tests/file/fwrite_error.phpt | 121 + .../tests/file/fwrite_variation1-win32.phpt | 235 ++ ext/standard/tests/file/fwrite_variation1.phpt | 233 ++ .../tests/file/fwrite_variation2-win32.phpt | 304 +++ ext/standard/tests/file/fwrite_variation2.phpt | 303 +++ .../tests/file/fwrite_variation3-win32.phpt | 380 +++ ext/standard/tests/file/fwrite_variation3.phpt | 381 +++ .../tests/file/fwrite_variation4-win32.phpt | 275 ++ ext/standard/tests/file/fwrite_variation4.phpt | 275 ++ ext/standard/tests/file/fwrite_variation5.phpt | 173 ++ ext/standard/tests/file/get_current_user.phpt | 15 + ext/standard/tests/file/glob_basic.phpt | 82 + ext/standard/tests/file/glob_error.phpt | 53 + ext/standard/tests/file/glob_error_002-win32.phpt | 27 + ext/standard/tests/file/glob_variation-win32.phpt | 465 ++++ ext/standard/tests/file/glob_variation.phpt | 465 ++++ ext/standard/tests/file/glob_variation2.phpt | 57 + ext/standard/tests/file/include_streams.phpt | 130 + .../tests/file/include_userstream_001.phpt | 82 + .../tests/file/include_userstream_002.phpt | 106 + .../tests/file/include_userstream_003.phpt | 121 + ext/standard/tests/file/is_dir_basic.phpt | 43 + ext/standard/tests/file/is_dir_error.phpt | 35 + ext/standard/tests/file/is_dir_variation1.phpt | 42 + ext/standard/tests/file/is_dir_variation2.phpt | 96 + ext/standard/tests/file/is_dir_variation3.phpt | 51 + ext/standard/tests/file/is_dir_variation4.phpt | 89 + .../tests/file/is_executable_basic-win32.phpt | 1064 ++++++++ ext/standard/tests/file/is_executable_basic.phpt | 1076 ++++++++ ext/standard/tests/file/is_executable_error.phpt | 29 + .../tests/file/is_executable_variation1.phpt | 92 + .../tests/file/is_executable_variation2.phpt | 110 + .../tests/file/is_executable_variation3.phpt | 69 + ext/standard/tests/file/is_file_basic.phpt | 48 + ext/standard/tests/file/is_file_error.phpt | 51 + ext/standard/tests/file/is_file_variation1.phpt | 57 + ext/standard/tests/file/is_file_variation2.phpt | 46 + ext/standard/tests/file/is_file_variation3.phpt | 60 + ext/standard/tests/file/is_file_variation4.phpt | 78 + .../tests/file/is_readable_basic-win32.phpt | 1066 ++++++++ ext/standard/tests/file/is_readable_basic.phpt | 1076 ++++++++ ext/standard/tests/file/is_readable_error.phpt | 29 + .../tests/file/is_readable_variation1.phpt | 105 + .../tests/file/is_readable_variation2.phpt | 109 + .../tests/file/is_readable_variation3.phpt | 68 + .../tests/file/is_uploaded_file_basic.phpt | 48 + ext/standard/tests/file/is_writable_basic.phpt | 1588 ++++++++++++ ext/standard/tests/file/is_writable_error.phpt | 45 + .../tests/file/is_writable_variation1.phpt | 125 + .../tests/file/is_writable_variation2.phpt | 126 + .../tests/file/is_writable_variation3.phpt | 78 + ext/standard/tests/file/lchgrp_basic.phpt | 36 + ext/standard/tests/file/lchown_basic.phpt | 44 + ext/standard/tests/file/lchown_error.phpt | 78 + ext/standard/tests/file/link_win32.phpt | 26 + ext/standard/tests/file/lstat_stat_basic.phpt | 317 +++ ext/standard/tests/file/lstat_stat_error.phpt | 79 + ext/standard/tests/file/lstat_stat_variation1.phpt | 61 + .../tests/file/lstat_stat_variation10.phpt | 59 + .../tests/file/lstat_stat_variation11.phpt | 60 + .../tests/file/lstat_stat_variation12.phpt | 66 + .../tests/file/lstat_stat_variation13.phpt | 58 + .../tests/file/lstat_stat_variation14.phpt | 62 + .../tests/file/lstat_stat_variation15.phpt | 64 + .../tests/file/lstat_stat_variation16.phpt | 58 + .../tests/file/lstat_stat_variation17.phpt | 57 + .../tests/file/lstat_stat_variation18.phpt | 176 ++ .../tests/file/lstat_stat_variation19.phpt | 285 +++ ext/standard/tests/file/lstat_stat_variation2.phpt | 62 + .../tests/file/lstat_stat_variation20.phpt | 287 +++ .../tests/file/lstat_stat_variation21.phpt | 65 + .../tests/file/lstat_stat_variation22.phpt | 54 + ext/standard/tests/file/lstat_stat_variation3.phpt | 62 + ext/standard/tests/file/lstat_stat_variation4.phpt | 65 + ext/standard/tests/file/lstat_stat_variation5.phpt | 66 + ext/standard/tests/file/lstat_stat_variation6.phpt | 79 + ext/standard/tests/file/lstat_stat_variation7.phpt | 57 + ext/standard/tests/file/lstat_stat_variation8.phpt | 62 + ext/standard/tests/file/lstat_stat_variation9.phpt | 68 + ext/standard/tests/file/mkdir-001.phpt | 36 + ext/standard/tests/file/mkdir-002.phpt | 55 + ext/standard/tests/file/mkdir-003.phpt | 30 + ext/standard/tests/file/mkdir-004.phpt | 24 + ext/standard/tests/file/mkdir-005.phpt | 25 + ext/standard/tests/file/mkdir-006.phpt | 20 + ext/standard/tests/file/mkdir_rmdir_error.phpt | 58 + .../tests/file/mkdir_rmdir_variation-win32.phpt | 1613 ++++++++++++ .../tests/file/mkdir_rmdir_variation1.phpt | 1579 ++++++++++++ .../tests/file/mkdir_rmdir_variation2.phpt | 80 + .../tests/file/mkdir_variation1-win32.phpt | 122 + ext/standard/tests/file/mkdir_variation1.phpt | 121 + ext/standard/tests/file/mkdir_variation2.phpt | 189 ++ ext/standard/tests/file/mkdir_variation3.phpt | 208 ++ ext/standard/tests/file/mkdir_variation4.phpt | 220 ++ .../tests/file/mkdir_variation5-win32.phpt | 105 + ext/standard/tests/file/mkdir_variation5.phpt | 98 + .../tests/file/move_uploaded_file_basic.phpt | 76 + ext/standard/tests/file/parse_ini_file.phpt | 489 ++++ ext/standard/tests/file/parse_ini_file_error.phpt | 47 + .../tests/file/parse_ini_file_variation1.phpt | 68 + .../tests/file/parse_ini_file_variation2.phpt | 111 + .../tests/file/parse_ini_file_variation3.phpt | 104 + .../tests/file/parse_ini_file_variation4.phpt | 211 ++ .../tests/file/parse_ini_file_variation5.phpt | 254 ++ .../file/parse_ini_file_variation6-win32.phpt | 143 ++ .../tests/file/parse_ini_file_variation6.phpt | 129 + ext/standard/tests/file/pathinfo_basic.phpt | 401 +++ ext/standard/tests/file/pathinfo_basic1-win32.phpt | 609 +++++ ext/standard/tests/file/pathinfo_basic1.phpt | 610 +++++ ext/standard/tests/file/pathinfo_basic2-win32.phpt | 270 ++ ext/standard/tests/file/pathinfo_basic2.phpt | 273 ++ ext/standard/tests/file/pathinfo_error.phpt | 24 + ext/standard/tests/file/pathinfo_variation1.phpt | 190 ++ ext/standard/tests/file/pathinfo_variation2.phpt | 197 ++ ext/standard/tests/file/pathinfo_variation3.phpt | 80 + ext/standard/tests/file/pathinfo_variaton.phpt | 442 ++++ ext/standard/tests/file/pclose_variation1.phpt | 232 ++ ext/standard/tests/file/php_fd_wrapper_01.phpt | 11 + ext/standard/tests/file/php_fd_wrapper_02.phpt | 11 + ext/standard/tests/file/php_fd_wrapper_03.phpt | 22 + ext/standard/tests/file/php_fd_wrapper_04.phpt | 20 + .../tests/file/popen_pclose_basic-win32.phpt | 75 + ext/standard/tests/file/popen_pclose_basic.phpt | 103 + .../tests/file/popen_pclose_error-sunos.phpt | 55 + .../tests/file/popen_pclose_error-win32-debug.phpt | 63 + .../tests/file/popen_pclose_error-win32.phpt | 59 + ext/standard/tests/file/popen_pclose_error.phpt | 56 + ext/standard/tests/file/proc_open01.phpt | 69 + ext/standard/tests/file/readfile_basic-win32.phpt | 530 ++++ ext/standard/tests/file/readfile_basic.phpt | 530 ++++ ext/standard/tests/file/readfile_error.phpt | 61 + ext/standard/tests/file/readfile_variation1.phpt | 46 + .../tests/file/readfile_variation10-win32.phpt | 87 + ext/standard/tests/file/readfile_variation10.phpt | Bin 0 -> 1869 bytes ext/standard/tests/file/readfile_variation2.phpt | 87 + ext/standard/tests/file/readfile_variation3.phpt | 63 + ext/standard/tests/file/readfile_variation4.phpt | 251 ++ ext/standard/tests/file/readfile_variation5.phpt | 221 ++ ext/standard/tests/file/readfile_variation6.phpt | 50 + ext/standard/tests/file/readfile_variation7.phpt | 50 + .../tests/file/readfile_variation8-win32.phpt | 109 + ext/standard/tests/file/readfile_variation9.phpt | 99 + .../tests/file/readlink_realpath_basic1.phpt | 111 + .../tests/file/readlink_realpath_basic2.phpt | 86 + .../tests/file/readlink_realpath_error.phpt | 73 + .../tests/file/readlink_realpath_variation1.phpt | 99 + .../tests/file/readlink_realpath_variation2.phpt | 104 + .../tests/file/readlink_realpath_variation3.phpt | 77 + ext/standard/tests/file/readlink_variation1.phpt | 78 + ext/standard/tests/file/realpath_basic-win32.phpt | 89 + ext/standard/tests/file/realpath_basic2.phpt | 13 + ext/standard/tests/file/realpath_basic3.phpt | 86 + ext/standard/tests/file/realpath_basic4.phpt | 29 + ext/standard/tests/file/realpath_cache.phpt | 30 + ext/standard/tests/file/realpath_cache_win32.phpt | 38 + ext/standard/tests/file/realpath_error-win32.phpt | 29 + .../tests/file/realpath_variation-win32.phpt | 102 + ext/standard/tests/file/realpath_variation2.phpt | 74 + ext/standard/tests/file/rename_basic.phpt | 45 + ext/standard/tests/file/rename_error.phpt | 35 + .../tests/file/rename_variation-win32.phpt | 87 + ext/standard/tests/file/rename_variation.phpt | 72 + .../tests/file/rename_variation1-win32.phpt | 81 + ext/standard/tests/file/rename_variation1.phpt | 71 + ext/standard/tests/file/rename_variation10.phpt | 253 ++ .../tests/file/rename_variation11-win32.phpt | 128 + .../tests/file/rename_variation12-win32.phpt | 121 + ext/standard/tests/file/rename_variation12.phpt | 121 + .../tests/file/rename_variation13-win32.phpt | Bin 0 -> 5058 bytes ext/standard/tests/file/rename_variation13.phpt | 133 + .../tests/file/rename_variation2-win32.phpt | 61 + ext/standard/tests/file/rename_variation2.phpt | 65 + .../tests/file/rename_variation3-win32.phpt | 84 + ext/standard/tests/file/rename_variation3.phpt | 60 + ext/standard/tests/file/rename_variation4.phpt | 51 + ext/standard/tests/file/rename_variation5.phpt | 96 + .../tests/file/rename_variation6-win32.phpt | 40 + ext/standard/tests/file/rename_variation6.phpt | 36 + .../tests/file/rename_variation7-win32.phpt | 36 + ext/standard/tests/file/rename_variation7.phpt | 31 + .../tests/file/rename_variation8-win32.phpt | 70 + ext/standard/tests/file/rename_variation8.phpt | 71 + ext/standard/tests/file/rename_variation9.phpt | 53 + .../tests/file/rmdir_variation1-win32.phpt | 127 + ext/standard/tests/file/rmdir_variation1.phpt | 127 + ext/standard/tests/file/rmdir_variation2.phpt | 244 ++ .../tests/file/rmdir_variation3-win32.phpt | 108 + ext/standard/tests/file/rmdir_variation3.phpt | 96 + ext/standard/tests/file/stat_basic-win32.phpt | 192 ++ ext/standard/tests/file/stat_error-win32.phpt | 55 + ext/standard/tests/file/stat_variation1-win32.phpt | 94 + ext/standard/tests/file/stat_variation2-win32.phpt | 65 + ext/standard/tests/file/stat_variation3-win32.phpt | 80 + ext/standard/tests/file/stat_variation4-win32.phpt | 93 + ext/standard/tests/file/stat_variation5-win32.phpt | 66 + ext/standard/tests/file/stat_variation6-win32.phpt | 92 + ext/standard/tests/file/stat_variation7-win32.phpt | 298 +++ ext/standard/tests/file/stat_variation8-win32.phpt | 77 + ext/standard/tests/file/statcache-corruption.phpt | 13 + ext/standard/tests/file/statpage.phpt | 20 + ext/standard/tests/file/stream_001.phpt | 24 + ext/standard/tests/file/stream_002.phpt | 53 + ext/standard/tests/file/stream_copy_to_stream.phpt | 154 ++ ext/standard/tests/file/stream_enclosed.phpt | 20 + ext/standard/tests/file/stream_get_line.phpt | 18 + ext/standard/tests/file/stream_rfc2397_001.phpt | 22 + ext/standard/tests/file/stream_rfc2397_002.phpt | 182 ++ ext/standard/tests/file/stream_rfc2397_003.gif | Bin 0 -> 273 bytes ext/standard/tests/file/stream_rfc2397_003.phpt | 38 + ext/standard/tests/file/stream_rfc2397_004.phpt | 32 + ext/standard/tests/file/stream_rfc2397_005.phpt | 38 + ext/standard/tests/file/stream_rfc2397_006.phpt | 33 + ext/standard/tests/file/stream_rfc2397_007.phpt | 143 ++ ext/standard/tests/file/stream_supports_lock.phpt | 46 + ext/standard/tests/file/symlink.phpt | 78 + .../file/symlink_link_linkinfo_is_link_basic1.phpt | 114 + .../file/symlink_link_linkinfo_is_link_basic2.phpt | 90 + .../file/symlink_link_linkinfo_is_link_error1.phpt | 115 + .../file/symlink_link_linkinfo_is_link_error2.phpt | 114 + .../symlink_link_linkinfo_is_link_variation1.phpt | 136 + .../symlink_link_linkinfo_is_link_variation2.phpt | 51 + .../symlink_link_linkinfo_is_link_variation3.phpt | 146 ++ .../symlink_link_linkinfo_is_link_variation4.phpt | 120 + .../symlink_link_linkinfo_is_link_variation5.phpt | 75 + .../symlink_link_linkinfo_is_link_variation6.phpt | 107 + .../symlink_link_linkinfo_is_link_variation7.phpt | 94 + .../symlink_link_linkinfo_is_link_variation8.phpt | 83 + .../symlink_link_linkinfo_is_link_variation9.phpt | 121 + ext/standard/tests/file/symlink_to_symlink.phpt | 50 + ext/standard/tests/file/tempnam_error.phpt | 48 + .../tests/file/tempnam_variation1-win32.phpt | 103 + ext/standard/tests/file/tempnam_variation1.phpt | 116 + .../tests/file/tempnam_variation2-win32.phpt | 163 ++ ext/standard/tests/file/tempnam_variation2.phpt | 163 ++ .../tests/file/tempnam_variation3-win32.phpt | 115 + ext/standard/tests/file/tempnam_variation3.phpt | 122 + ext/standard/tests/file/tempnam_variation4.phpt | 1092 ++++++++ .../tests/file/tempnam_variation5-win32.phpt | 54 + ext/standard/tests/file/tempnam_variation5.phpt | 52 + .../tests/file/tempnam_variation6-win32.phpt | 62 + ext/standard/tests/file/tempnam_variation6.phpt | 60 + .../tests/file/tempnam_variation7-win32.phpt | 113 + ext/standard/tests/file/tempnam_variation7.phpt | 118 + .../tests/file/tempnam_variation8-win32.phpt | 147 ++ ext/standard/tests/file/test.csv | 17 + ext/standard/tests/file/test2.csv | 1 + ext/standard/tests/file/test3.csv | Bin 0 -> 8 bytes ext/standard/tests/file/touch.phpt | 58 + ext/standard/tests/file/touch_basic-win32.phpt | 96 + ext/standard/tests/file/touch_basic.phpt | 97 + ext/standard/tests/file/touch_error.phpt | 22 + ext/standard/tests/file/touch_variation1.phpt | 39 + ext/standard/tests/file/touch_variation2.phpt | 24 + .../tests/file/touch_variation3-win32.phpt | 199 ++ ext/standard/tests/file/touch_variation3.phpt | 199 ++ .../tests/file/touch_variation4-win32.phpt | 199 ++ ext/standard/tests/file/touch_variation4.phpt | 199 ++ .../tests/file/touch_variation5-win32.phpt | 230 ++ ext/standard/tests/file/touch_variation5.phpt | 230 ++ .../tests/file/touch_variation6-win32.phpt | 242 ++ ext/standard/tests/file/umask_basic.phpt | 2079 ++++++++++++++++ ext/standard/tests/file/umask_error.phpt | 26 + ext/standard/tests/file/umask_variation1.phpt | 761 ++++++ ext/standard/tests/file/umask_variation2.phpt | 899 +++++++ ext/standard/tests/file/umask_variation3.phpt | 237 ++ ext/standard/tests/file/unlink_basic.phpt | 43 + ext/standard/tests/file/unlink_error-win32.phpt | 110 + ext/standard/tests/file/unlink_error.phpt | 110 + .../tests/file/unlink_variation1-win32.phpt | 85 + ext/standard/tests/file/unlink_variation1.phpt | 92 + ext/standard/tests/file/unlink_variation10.phpt | 106 + .../tests/file/unlink_variation2-win32.phpt | 43 + ext/standard/tests/file/unlink_variation2.phpt | 37 + ext/standard/tests/file/unlink_variation3.phpt | 60 + ext/standard/tests/file/unlink_variation4.phpt | 37 + ext/standard/tests/file/unlink_variation5.phpt | 2087 ++++++++++++++++ ext/standard/tests/file/unlink_variation6.phpt | 41 + ext/standard/tests/file/unlink_variation7.phpt | 246 ++ .../tests/file/unlink_variation8-win32.phpt | 113 + ext/standard/tests/file/unlink_variation8.phpt | 206 ++ .../tests/file/unlink_variation9-win32.phpt | 117 + ext/standard/tests/file/userdirstream.phpt | 51 + ext/standard/tests/file/userfilters.phpt | 37 + ext/standard/tests/file/userstreams.phpt | 325 +++ ext/standard/tests/file/userstreams_002.phpt | 94 + ext/standard/tests/file/userstreams_003.phpt | 153 ++ ext/standard/tests/file/userstreams_004.phpt | 58 + ext/standard/tests/file/userstreams_005.phpt | 63 + ext/standard/tests/file/userstreams_006.phpt | 38 + ext/standard/tests/file/userstreams_007.phpt | 49 + ext/standard/tests/file/userwrapper.phpt | 83 + ext/standard/tests/file/windows_acls/bug44859.phpt | 63 + .../tests/file/windows_acls/bug44859_2.phpt | 63 + .../tests/file/windows_acls/bug44859_3.phpt | 37 + .../tests/file/windows_acls/bug44859_4.phpt | 65 + ext/standard/tests/file/windows_acls/common.inc | 199 ++ ext/standard/tests/file/windows_acls/tiny.bat | 1 + ext/standard/tests/file/windows_acls/tiny.exe | Bin 0 -> 133 bytes .../tests/file/windows_links/bug48746.phpt | 58 + .../tests/file/windows_links/bug48746_1.phpt | 59 + .../tests/file/windows_links/bug48746_2.phpt | 69 + .../tests/file/windows_links/bug48746_3.phpt | 50 + ext/standard/tests/file/windows_links/common.inc | 23 + 803 files changed, 180721 insertions(+) create mode 100644 ext/standard/tests/file/001-win32.phpt create mode 100644 ext/standard/tests/file/001.phpt create mode 100644 ext/standard/tests/file/002.phpt create mode 100644 ext/standard/tests/file/003.phpt create mode 100644 ext/standard/tests/file/004.phpt create mode 100644 ext/standard/tests/file/005_basic.phpt create mode 100644 ext/standard/tests/file/005_error.phpt create mode 100644 ext/standard/tests/file/005_variation-win32.phpt create mode 100644 ext/standard/tests/file/005_variation.phpt create mode 100644 ext/standard/tests/file/005_variation2-win32.phpt create mode 100644 ext/standard/tests/file/005_variation2.phpt create mode 100644 ext/standard/tests/file/006_basic.phpt create mode 100644 ext/standard/tests/file/006_error.phpt create mode 100644 ext/standard/tests/file/006_variation1.phpt create mode 100644 ext/standard/tests/file/006_variation2.phpt create mode 100644 ext/standard/tests/file/007_basic.phpt create mode 100644 ext/standard/tests/file/007_error.phpt create mode 100644 ext/standard/tests/file/007_variation1.phpt create mode 100644 ext/standard/tests/file/007_variation10.phpt create mode 100644 ext/standard/tests/file/007_variation11-win32.phpt create mode 100644 ext/standard/tests/file/007_variation11.phpt create mode 100644 ext/standard/tests/file/007_variation12-win32.phpt create mode 100644 ext/standard/tests/file/007_variation12.phpt create mode 100644 ext/standard/tests/file/007_variation13-win32.phpt create mode 100644 ext/standard/tests/file/007_variation13.phpt create mode 100644 ext/standard/tests/file/007_variation14.phpt create mode 100644 ext/standard/tests/file/007_variation15.phpt create mode 100644 ext/standard/tests/file/007_variation16.phpt create mode 100644 ext/standard/tests/file/007_variation17.phpt create mode 100644 ext/standard/tests/file/007_variation18.phpt create mode 100644 ext/standard/tests/file/007_variation19.phpt create mode 100644 ext/standard/tests/file/007_variation2.phpt create mode 100644 ext/standard/tests/file/007_variation20.phpt create mode 100644 ext/standard/tests/file/007_variation21.phpt create mode 100644 ext/standard/tests/file/007_variation22.phpt create mode 100644 ext/standard/tests/file/007_variation23.phpt create mode 100644 ext/standard/tests/file/007_variation24.phpt create mode 100644 ext/standard/tests/file/007_variation3.phpt create mode 100644 ext/standard/tests/file/007_variation4.phpt create mode 100644 ext/standard/tests/file/007_variation5.phpt create mode 100644 ext/standard/tests/file/007_variation6.phpt create mode 100644 ext/standard/tests/file/007_variation7.phpt create mode 100644 ext/standard/tests/file/007_variation8.phpt create mode 100644 ext/standard/tests/file/007_variation9.phpt create mode 100644 ext/standard/tests/file/basename-win32.phpt create mode 100644 ext/standard/tests/file/basename.phpt create mode 100644 ext/standard/tests/file/basename_basic-win32.phpt create mode 100644 ext/standard/tests/file/basename_basic.phpt create mode 100644 ext/standard/tests/file/basename_error.phpt create mode 100644 ext/standard/tests/file/basename_variation1-win32.phpt create mode 100644 ext/standard/tests/file/basename_variation1.phpt create mode 100644 ext/standard/tests/file/basename_variation2-win32.phpt create mode 100644 ext/standard/tests/file/basename_variation2.phpt create mode 100644 ext/standard/tests/file/basename_variation3.phpt create mode 100644 ext/standard/tests/file/basename_variation4.phpt create mode 100644 ext/standard/tests/file/bug12556.phpt create mode 100644 ext/standard/tests/file/bug20424.phpt create mode 100644 ext/standard/tests/file/bug22382.phpt create mode 100644 ext/standard/tests/file/bug22414.phpt create mode 100644 ext/standard/tests/file/bug24313.phpt create mode 100644 ext/standard/tests/file/bug24482.phpt create mode 100644 ext/standard/tests/file/bug26003.phpt create mode 100644 ext/standard/tests/file/bug26615.phpt create mode 100644 ext/standard/tests/file/bug26938.phpt create mode 100644 ext/standard/tests/file/bug27508.phpt create mode 100644 ext/standard/tests/file/bug27619.phpt create mode 100644 ext/standard/tests/file/bug30362.phpt create mode 100644 ext/standard/tests/file/bug30362.txt create mode 100644 ext/standard/tests/file/bug32160.phpt create mode 100644 ext/standard/tests/file/bug32160.txt create mode 100644 ext/standard/tests/file/bug35740.phpt create mode 100644 ext/standard/tests/file/bug35781.phpt create mode 100644 ext/standard/tests/file/bug37158.phpt create mode 100644 ext/standard/tests/file/bug37864.phpt create mode 100644 ext/standard/tests/file/bug38086.phpt create mode 100644 ext/standard/tests/file/bug38086.txt create mode 100644 ext/standard/tests/file/bug38450.phpt create mode 100644 ext/standard/tests/file/bug38450_1.phpt create mode 100644 ext/standard/tests/file/bug38450_2.phpt create mode 100644 ext/standard/tests/file/bug38450_3.phpt create mode 100644 ext/standard/tests/file/bug39367.phpt create mode 100644 ext/standard/tests/file/bug39538.phpt create mode 100644 ext/standard/tests/file/bug39551.phpt create mode 100644 ext/standard/tests/file/bug39673.phpt create mode 100644 ext/standard/tests/file/bug39863.phpt create mode 100644 ext/standard/tests/file/bug40374.phpt create mode 100644 ext/standard/tests/file/bug40501.csv create mode 100644 ext/standard/tests/file/bug40501.phpt create mode 100644 ext/standard/tests/file/bug41655_1.phpt create mode 100644 ext/standard/tests/file/bug41655_2.phpt create mode 100644 ext/standard/tests/file/bug41693.phpt create mode 100644 ext/standard/tests/file/bug41815.phpt create mode 100644 ext/standard/tests/file/bug41874.phpt create mode 100644 ext/standard/tests/file/bug41874_1.phpt create mode 100644 ext/standard/tests/file/bug41874_2.phpt create mode 100644 ext/standard/tests/file/bug41874_3.phpt create mode 100644 ext/standard/tests/file/bug43008.phpt create mode 100644 ext/standard/tests/file/bug43137.phpt create mode 100644 ext/standard/tests/file/bug43216.phpt create mode 100644 ext/standard/tests/file/bug43248.phpt create mode 100644 ext/standard/tests/file/bug43353-win32.phpt create mode 100644 ext/standard/tests/file/bug43353.phpt create mode 100644 ext/standard/tests/file/bug43522.phpt create mode 100644 ext/standard/tests/file/bug44034.phpt create mode 100644 ext/standard/tests/file/bug44607.phpt create mode 100644 ext/standard/tests/file/bug44805.phpt create mode 100644 ext/standard/tests/file/bug45181.phpt create mode 100644 ext/standard/tests/file/bug45303.phpt create mode 100644 ext/standard/tests/file/bug45985.phpt create mode 100644 ext/standard/tests/file/bug46347.phpt create mode 100644 ext/standard/tests/file/bug47767.phpt create mode 100644 ext/standard/tests/file/bug49047.phpt create mode 100644 ext/standard/tests/file/bug51094.phpt create mode 100644 ext/standard/tests/file/bug52624.phpt create mode 100644 ext/standard/tests/file/bug52820.phpt create mode 100644 ext/standard/tests/file/bug53241.phpt create mode 100644 ext/standard/tests/file/bug53848.phpt create mode 100644 ext/standard/tests/file/bug55124.phpt create mode 100644 ext/standard/tests/file/bug60120.phpt create mode 100644 ext/standard/tests/file/bug61961.phpt create mode 100644 ext/standard/tests/file/bug63512.phpt create mode 100644 ext/standard/tests/file/chgrp.phpt create mode 100644 ext/standard/tests/file/chmod_basic-win32.phpt create mode 100644 ext/standard/tests/file/chmod_basic.phpt create mode 100644 ext/standard/tests/file/chmod_error.phpt create mode 100644 ext/standard/tests/file/chmod_variation1.phpt create mode 100644 ext/standard/tests/file/chmod_variation2-win32.phpt create mode 100644 ext/standard/tests/file/chmod_variation2.phpt create mode 100644 ext/standard/tests/file/chmod_variation3.phpt create mode 100644 ext/standard/tests/file/chmod_variation4.phpt create mode 100644 ext/standard/tests/file/chown.phpt create mode 100644 ext/standard/tests/file/chroot_001.phpt create mode 100644 ext/standard/tests/file/clearstatcache_001.phpt create mode 100644 ext/standard/tests/file/clearstatcache_error.phpt create mode 100644 ext/standard/tests/file/copy_basic.phpt create mode 100644 ext/standard/tests/file/copy_error.phpt create mode 100644 ext/standard/tests/file/copy_variation1.phpt create mode 100644 ext/standard/tests/file/copy_variation10.phpt create mode 100644 ext/standard/tests/file/copy_variation11.phpt create mode 100644 ext/standard/tests/file/copy_variation12-win32.phpt create mode 100644 ext/standard/tests/file/copy_variation12.phpt create mode 100644 ext/standard/tests/file/copy_variation13.phpt create mode 100644 ext/standard/tests/file/copy_variation14.phpt create mode 100644 ext/standard/tests/file/copy_variation15.phpt create mode 100644 ext/standard/tests/file/copy_variation16-win32.phpt create mode 100644 ext/standard/tests/file/copy_variation16.phpt create mode 100644 ext/standard/tests/file/copy_variation17.phpt create mode 100644 ext/standard/tests/file/copy_variation18.phpt create mode 100644 ext/standard/tests/file/copy_variation2-win32.phpt create mode 100644 ext/standard/tests/file/copy_variation2.phpt create mode 100644 ext/standard/tests/file/copy_variation3-win32.phpt create mode 100644 ext/standard/tests/file/copy_variation3.phpt create mode 100644 ext/standard/tests/file/copy_variation4.phpt create mode 100644 ext/standard/tests/file/copy_variation5-win32.phpt create mode 100644 ext/standard/tests/file/copy_variation5.phpt create mode 100644 ext/standard/tests/file/copy_variation6-win32.phpt create mode 100644 ext/standard/tests/file/copy_variation6.phpt create mode 100644 ext/standard/tests/file/copy_variation7.phpt create mode 100644 ext/standard/tests/file/copy_variation8.phpt create mode 100644 ext/standard/tests/file/copy_variation9.phpt create mode 100644 ext/standard/tests/file/directory_wrapper_fstat_basic.phpt create mode 100644 ext/standard/tests/file/dirname_basic-win32.phpt create mode 100644 ext/standard/tests/file/dirname_basic.phpt create mode 100644 ext/standard/tests/file/dirname_error.phpt create mode 100644 ext/standard/tests/file/dirname_variation1.phpt create mode 100644 ext/standard/tests/file/disk.phpt create mode 100644 ext/standard/tests/file/disk_free_space_basic.phpt create mode 100644 ext/standard/tests/file/disk_free_space_error-win32.phpt create mode 100644 ext/standard/tests/file/disk_free_space_error.phpt create mode 100644 ext/standard/tests/file/disk_free_space_variation.phpt create mode 100644 ext/standard/tests/file/disk_total_space_basic.phpt create mode 100644 ext/standard/tests/file/disk_total_space_error-win32.phpt create mode 100644 ext/standard/tests/file/disk_total_space_error.phpt create mode 100644 ext/standard/tests/file/disk_total_space_variation.phpt create mode 100644 ext/standard/tests/file/fclose_variation1.phpt create mode 100644 ext/standard/tests/file/feof_basic.phpt create mode 100644 ext/standard/tests/file/fflush_basic.phpt create mode 100644 ext/standard/tests/file/fflush_error.phpt create mode 100644 ext/standard/tests/file/fflush_variation1-win32.phpt create mode 100644 ext/standard/tests/file/fflush_variation1.phpt create mode 100644 ext/standard/tests/file/fflush_variation2.phpt create mode 100644 ext/standard/tests/file/fflush_variation3.phpt create mode 100644 ext/standard/tests/file/fflush_variation4.phpt create mode 100644 ext/standard/tests/file/fgetc_basic.phpt create mode 100644 ext/standard/tests/file/fgetc_error.phpt create mode 100644 ext/standard/tests/file/fgetc_variation1.phpt create mode 100644 ext/standard/tests/file/fgetc_variation2.phpt create mode 100644 ext/standard/tests/file/fgetc_variation3.phpt create mode 100644 ext/standard/tests/file/fgetc_variation4.phpt create mode 100644 ext/standard/tests/file/fgetcsv.phpt create mode 100644 ext/standard/tests/file/fgetcsv_error.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation1.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation10.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation11.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation12.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation13.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation14.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation15.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation16.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation17.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation18.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation19.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation2.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation20.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation21.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation22.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation23.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation24.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation25.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation26.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation27.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation28.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation29.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation3.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation30.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation31.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation4.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation5.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation6.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation7.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation8.phpt create mode 100644 ext/standard/tests/file/fgetcsv_variation9.phpt create mode 100644 ext/standard/tests/file/fgets_basic.phpt create mode 100644 ext/standard/tests/file/fgets_error.phpt create mode 100644 ext/standard/tests/file/fgets_socket_variation1.phpt create mode 100644 ext/standard/tests/file/fgets_socket_variation2.phpt create mode 100644 ext/standard/tests/file/fgets_variation1.phpt create mode 100644 ext/standard/tests/file/fgets_variation2.phpt create mode 100644 ext/standard/tests/file/fgets_variation3.phpt create mode 100644 ext/standard/tests/file/fgets_variation4-win32.phpt create mode 100644 ext/standard/tests/file/fgets_variation4.phpt create mode 100644 ext/standard/tests/file/fgets_variation5.phpt create mode 100644 ext/standard/tests/file/fgets_variation6-win32.phpt create mode 100644 ext/standard/tests/file/fgets_variation6.phpt create mode 100644 ext/standard/tests/file/fgetss.phpt create mode 100644 ext/standard/tests/file/fgetss1.phpt create mode 100644 ext/standard/tests/file/fgetss_basic1.phpt create mode 100644 ext/standard/tests/file/fgetss_basic2-win32.phpt create mode 100644 ext/standard/tests/file/fgetss_basic2.phpt create mode 100644 ext/standard/tests/file/fgetss_error.phpt create mode 100644 ext/standard/tests/file/fgetss_variation1-win32.phpt create mode 100644 ext/standard/tests/file/fgetss_variation1.phpt create mode 100644 ext/standard/tests/file/fgetss_variation2.phpt create mode 100644 ext/standard/tests/file/fgetss_variation3-win32.phpt create mode 100644 ext/standard/tests/file/fgetss_variation3.phpt create mode 100644 ext/standard/tests/file/fgetss_variation4.phpt create mode 100644 ext/standard/tests/file/fgetss_variation5-win32.phpt create mode 100644 ext/standard/tests/file/fgetss_variation5.phpt create mode 100644 ext/standard/tests/file/file.inc create mode 100644 ext/standard/tests/file/file_basic.phpt create mode 100644 ext/standard/tests/file/file_error.phpt create mode 100644 ext/standard/tests/file/file_exists_error.phpt create mode 100644 ext/standard/tests/file/file_exists_variation1.phpt create mode 100644 ext/standard/tests/file/file_get_contents_basic.phpt create mode 100644 ext/standard/tests/file/file_get_contents_basic001.phpt create mode 100644 ext/standard/tests/file/file_get_contents_error.phpt create mode 100644 ext/standard/tests/file/file_get_contents_error001.phpt create mode 100644 ext/standard/tests/file/file_get_contents_error002.phpt create mode 100644 ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt create mode 100644 ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt create mode 100644 ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt create mode 100644 ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation1.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation2.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation3.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation4.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation5.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation6.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation7-win32.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation7.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation8-win32.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation8.phpt create mode 100644 ext/standard/tests/file/file_get_contents_variation9.phpt create mode 100644 ext/standard/tests/file/file_put_contents.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation1.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation2.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation3.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation4.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation5.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation6.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation7-win32.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation7.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation8-win32.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation8.phpt create mode 100644 ext/standard/tests/file/file_put_contents_variation9.phpt create mode 100644 ext/standard/tests/file/file_variation.phpt create mode 100644 ext/standard/tests/file/file_variation2.phpt create mode 100644 ext/standard/tests/file/file_variation3.phpt create mode 100644 ext/standard/tests/file/file_variation4.phpt create mode 100644 ext/standard/tests/file/file_variation5-win32.phpt create mode 100644 ext/standard/tests/file/file_variation5.phpt create mode 100644 ext/standard/tests/file/file_variation6.phpt create mode 100644 ext/standard/tests/file/file_variation7.phpt create mode 100644 ext/standard/tests/file/file_variation8-win32.phpt create mode 100644 ext/standard/tests/file/file_variation8.phpt create mode 100644 ext/standard/tests/file/file_variation9.phpt create mode 100644 ext/standard/tests/file/filegroup_basic.phpt create mode 100644 ext/standard/tests/file/filegroup_error.phpt create mode 100644 ext/standard/tests/file/filegroup_variation1.phpt create mode 100644 ext/standard/tests/file/filegroup_variation2.phpt create mode 100644 ext/standard/tests/file/filegroup_variation3.phpt create mode 100644 ext/standard/tests/file/fileinode_basic.phpt create mode 100644 ext/standard/tests/file/fileinode_error.phpt create mode 100644 ext/standard/tests/file/fileinode_variation.phpt create mode 100644 ext/standard/tests/file/fileinode_variation1.phpt create mode 100644 ext/standard/tests/file/fileinode_variation2.phpt create mode 100644 ext/standard/tests/file/fileinode_variation3.phpt create mode 100644 ext/standard/tests/file/fileowner_basic.phpt create mode 100644 ext/standard/tests/file/fileowner_error.phpt create mode 100644 ext/standard/tests/file/fileowner_variation1.phpt create mode 100644 ext/standard/tests/file/fileowner_variation2.phpt create mode 100644 ext/standard/tests/file/fileowner_variation3.phpt create mode 100644 ext/standard/tests/file/fileperms_variation1.phpt create mode 100644 ext/standard/tests/file/fileperms_variation2.phpt create mode 100644 ext/standard/tests/file/fileperms_variation3.phpt create mode 100644 ext/standard/tests/file/filesize_basic.phpt create mode 100644 ext/standard/tests/file/filesize_error.phpt create mode 100644 ext/standard/tests/file/filesize_variation1-win32.phpt create mode 100644 ext/standard/tests/file/filesize_variation1.phpt create mode 100644 ext/standard/tests/file/filesize_variation2-win32.phpt create mode 100644 ext/standard/tests/file/filesize_variation2.phpt create mode 100644 ext/standard/tests/file/filesize_variation3-win32.phpt create mode 100644 ext/standard/tests/file/filesize_variation3.phpt create mode 100644 ext/standard/tests/file/filesize_variation4-win32.phpt create mode 100644 ext/standard/tests/file/filesize_variation4.phpt create mode 100644 ext/standard/tests/file/filesize_variation5.phpt create mode 100644 ext/standard/tests/file/filestat.phpt create mode 100644 ext/standard/tests/file/filetype_basic.phpt create mode 100644 ext/standard/tests/file/filetype_error.phpt create mode 100644 ext/standard/tests/file/filetype_variation.phpt create mode 100644 ext/standard/tests/file/filetype_variation2.phpt create mode 100644 ext/standard/tests/file/filetype_variation3.phpt create mode 100644 ext/standard/tests/file/flock.phpt create mode 100644 ext/standard/tests/file/flock_basic.phpt create mode 100644 ext/standard/tests/file/flock_error.phpt create mode 100644 ext/standard/tests/file/flock_variation.phpt create mode 100644 ext/standard/tests/file/fnmatch_basic.phpt create mode 100644 ext/standard/tests/file/fnmatch_error.phpt create mode 100644 ext/standard/tests/file/fnmatch_variation.phpt create mode 100644 ext/standard/tests/file/fopen_include_path.inc create mode 100644 ext/standard/tests/file/fopen_variation1.phpt create mode 100644 ext/standard/tests/file/fopen_variation10-win32.phpt create mode 100644 ext/standard/tests/file/fopen_variation11-win32.phpt create mode 100644 ext/standard/tests/file/fopen_variation12.phpt create mode 100644 ext/standard/tests/file/fopen_variation13.phpt create mode 100644 ext/standard/tests/file/fopen_variation14-win32.phpt create mode 100644 ext/standard/tests/file/fopen_variation14.phpt create mode 100644 ext/standard/tests/file/fopen_variation15-win32.phpt create mode 100644 ext/standard/tests/file/fopen_variation15.phpt create mode 100644 ext/standard/tests/file/fopen_variation16.phpt create mode 100644 ext/standard/tests/file/fopen_variation17.phpt create mode 100644 ext/standard/tests/file/fopen_variation19.phpt create mode 100644 ext/standard/tests/file/fopen_variation3.phpt create mode 100644 ext/standard/tests/file/fopen_variation4.phpt create mode 100644 ext/standard/tests/file/fopen_variation5.phpt create mode 100644 ext/standard/tests/file/fopen_variation6.phpt create mode 100644 ext/standard/tests/file/fopen_variation7.phpt create mode 100644 ext/standard/tests/file/fopen_variation8.phpt create mode 100644 ext/standard/tests/file/fopen_variation9.phpt create mode 100644 ext/standard/tests/file/fopencookie.phpt create mode 100644 ext/standard/tests/file/fpassthru_basic.phpt create mode 100644 ext/standard/tests/file/fpassthru_error.phpt create mode 100644 ext/standard/tests/file/fpassthru_variation.phpt create mode 100644 ext/standard/tests/file/fpassthru_variation1.phpt create mode 100644 ext/standard/tests/file/fputcsv.phpt create mode 100644 ext/standard/tests/file/fputcsv_002.phpt create mode 100644 ext/standard/tests/file/fputcsv_error.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation1.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation10.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation11.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation12.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation13.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation14.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation2.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation3.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation4.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation5.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation6.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation7.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation8.phpt create mode 100644 ext/standard/tests/file/fputcsv_variation9.phpt create mode 100644 ext/standard/tests/file/fread_basic.phpt create mode 100644 ext/standard/tests/file/fread_error.phpt create mode 100644 ext/standard/tests/file/fread_fwrite_basic.phpt create mode 100644 ext/standard/tests/file/fread_socket_variation1.phpt create mode 100644 ext/standard/tests/file/fread_variation1.phpt create mode 100644 ext/standard/tests/file/fread_variation2.phpt create mode 100644 ext/standard/tests/file/fread_variation3-win32.phpt create mode 100644 ext/standard/tests/file/fread_variation3.phpt create mode 100644 ext/standard/tests/file/fread_variation4-win32.phpt create mode 100644 ext/standard/tests/file/fread_variation4.phpt create mode 100644 ext/standard/tests/file/fscanf.phpt create mode 100644 ext/standard/tests/file/fscanf_error.phpt create mode 100644 ext/standard/tests/file/fscanf_variation1.phpt create mode 100644 ext/standard/tests/file/fscanf_variation10.phpt create mode 100644 ext/standard/tests/file/fscanf_variation11.phpt create mode 100644 ext/standard/tests/file/fscanf_variation12.phpt create mode 100644 ext/standard/tests/file/fscanf_variation13.phpt create mode 100644 ext/standard/tests/file/fscanf_variation14.phpt create mode 100644 ext/standard/tests/file/fscanf_variation15.phpt create mode 100644 ext/standard/tests/file/fscanf_variation16.phpt create mode 100644 ext/standard/tests/file/fscanf_variation17.phpt create mode 100644 ext/standard/tests/file/fscanf_variation18.phpt create mode 100644 ext/standard/tests/file/fscanf_variation19.phpt create mode 100644 ext/standard/tests/file/fscanf_variation2.phpt create mode 100644 ext/standard/tests/file/fscanf_variation20.phpt create mode 100644 ext/standard/tests/file/fscanf_variation21.phpt create mode 100644 ext/standard/tests/file/fscanf_variation22.phpt create mode 100644 ext/standard/tests/file/fscanf_variation23.phpt create mode 100644 ext/standard/tests/file/fscanf_variation24.phpt create mode 100644 ext/standard/tests/file/fscanf_variation25.phpt create mode 100644 ext/standard/tests/file/fscanf_variation26.phpt create mode 100644 ext/standard/tests/file/fscanf_variation27.phpt create mode 100644 ext/standard/tests/file/fscanf_variation28.phpt create mode 100644 ext/standard/tests/file/fscanf_variation29.phpt create mode 100644 ext/standard/tests/file/fscanf_variation3.phpt create mode 100644 ext/standard/tests/file/fscanf_variation30.phpt create mode 100644 ext/standard/tests/file/fscanf_variation31.phpt create mode 100644 ext/standard/tests/file/fscanf_variation32.phpt create mode 100644 ext/standard/tests/file/fscanf_variation33.phpt create mode 100644 ext/standard/tests/file/fscanf_variation34.phpt create mode 100644 ext/standard/tests/file/fscanf_variation35.phpt create mode 100644 ext/standard/tests/file/fscanf_variation36.phpt create mode 100644 ext/standard/tests/file/fscanf_variation37.phpt create mode 100644 ext/standard/tests/file/fscanf_variation38.phpt create mode 100644 ext/standard/tests/file/fscanf_variation39.phpt create mode 100644 ext/standard/tests/file/fscanf_variation4.phpt create mode 100644 ext/standard/tests/file/fscanf_variation40.phpt create mode 100644 ext/standard/tests/file/fscanf_variation41.phpt create mode 100644 ext/standard/tests/file/fscanf_variation42.phpt create mode 100644 ext/standard/tests/file/fscanf_variation43.phpt create mode 100644 ext/standard/tests/file/fscanf_variation44.phpt create mode 100644 ext/standard/tests/file/fscanf_variation45.phpt create mode 100644 ext/standard/tests/file/fscanf_variation46.phpt create mode 100644 ext/standard/tests/file/fscanf_variation47.phpt create mode 100644 ext/standard/tests/file/fscanf_variation48.phpt create mode 100644 ext/standard/tests/file/fscanf_variation49.phpt create mode 100644 ext/standard/tests/file/fscanf_variation5.phpt create mode 100644 ext/standard/tests/file/fscanf_variation50.phpt create mode 100644 ext/standard/tests/file/fscanf_variation51.phpt create mode 100644 ext/standard/tests/file/fscanf_variation52.phpt create mode 100644 ext/standard/tests/file/fscanf_variation53.phpt create mode 100644 ext/standard/tests/file/fscanf_variation54.phpt create mode 100644 ext/standard/tests/file/fscanf_variation55.phpt create mode 100644 ext/standard/tests/file/fscanf_variation6.phpt create mode 100644 ext/standard/tests/file/fscanf_variation7.phpt create mode 100644 ext/standard/tests/file/fscanf_variation8.phpt create mode 100644 ext/standard/tests/file/fscanf_variation9.phpt create mode 100644 ext/standard/tests/file/fseek_dir_basic.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_error1.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_error2.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_error3.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt create mode 100644 ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt create mode 100644 ext/standard/tests/file/fseek_variation1.phpt create mode 100644 ext/standard/tests/file/fseek_variation2.phpt create mode 100644 ext/standard/tests/file/fseek_variation3.phpt create mode 100644 ext/standard/tests/file/fstat.phpt create mode 100644 ext/standard/tests/file/fstat_basic.phpt create mode 100644 ext/standard/tests/file/fstat_error.phpt create mode 100644 ext/standard/tests/file/fstat_variation1.phpt create mode 100644 ext/standard/tests/file/fstat_variation2.phpt create mode 100644 ext/standard/tests/file/fstat_variation3.phpt create mode 100644 ext/standard/tests/file/fstat_variation4.phpt create mode 100644 ext/standard/tests/file/fstat_variation5.phpt create mode 100644 ext/standard/tests/file/fstat_variation6.phpt create mode 100644 ext/standard/tests/file/fstat_variation7.phpt create mode 100644 ext/standard/tests/file/fstat_variation8.phpt create mode 100644 ext/standard/tests/file/ftruncate.phpt create mode 100644 ext/standard/tests/file/ftruncate_error.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation1-win32.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation1.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation2-win32.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation2.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation3-win32.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation3.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation4-win32.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation4.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation5-win32.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation5.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation6-win32.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation6.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation7-win32.phpt create mode 100644 ext/standard/tests/file/ftruncate_variation7.phpt create mode 100644 ext/standard/tests/file/fwrite.phpt create mode 100644 ext/standard/tests/file/fwrite_basic-win32.phpt create mode 100644 ext/standard/tests/file/fwrite_basic.phpt create mode 100644 ext/standard/tests/file/fwrite_error.phpt create mode 100644 ext/standard/tests/file/fwrite_variation1-win32.phpt create mode 100644 ext/standard/tests/file/fwrite_variation1.phpt create mode 100644 ext/standard/tests/file/fwrite_variation2-win32.phpt create mode 100644 ext/standard/tests/file/fwrite_variation2.phpt create mode 100644 ext/standard/tests/file/fwrite_variation3-win32.phpt create mode 100644 ext/standard/tests/file/fwrite_variation3.phpt create mode 100644 ext/standard/tests/file/fwrite_variation4-win32.phpt create mode 100644 ext/standard/tests/file/fwrite_variation4.phpt create mode 100644 ext/standard/tests/file/fwrite_variation5.phpt create mode 100644 ext/standard/tests/file/get_current_user.phpt create mode 100644 ext/standard/tests/file/glob_basic.phpt create mode 100644 ext/standard/tests/file/glob_error.phpt create mode 100644 ext/standard/tests/file/glob_error_002-win32.phpt create mode 100644 ext/standard/tests/file/glob_variation-win32.phpt create mode 100644 ext/standard/tests/file/glob_variation.phpt create mode 100644 ext/standard/tests/file/glob_variation2.phpt create mode 100644 ext/standard/tests/file/include_streams.phpt create mode 100644 ext/standard/tests/file/include_userstream_001.phpt create mode 100644 ext/standard/tests/file/include_userstream_002.phpt create mode 100644 ext/standard/tests/file/include_userstream_003.phpt create mode 100644 ext/standard/tests/file/is_dir_basic.phpt create mode 100644 ext/standard/tests/file/is_dir_error.phpt create mode 100644 ext/standard/tests/file/is_dir_variation1.phpt create mode 100644 ext/standard/tests/file/is_dir_variation2.phpt create mode 100644 ext/standard/tests/file/is_dir_variation3.phpt create mode 100644 ext/standard/tests/file/is_dir_variation4.phpt create mode 100644 ext/standard/tests/file/is_executable_basic-win32.phpt create mode 100644 ext/standard/tests/file/is_executable_basic.phpt create mode 100644 ext/standard/tests/file/is_executable_error.phpt create mode 100644 ext/standard/tests/file/is_executable_variation1.phpt create mode 100644 ext/standard/tests/file/is_executable_variation2.phpt create mode 100644 ext/standard/tests/file/is_executable_variation3.phpt create mode 100644 ext/standard/tests/file/is_file_basic.phpt create mode 100644 ext/standard/tests/file/is_file_error.phpt create mode 100644 ext/standard/tests/file/is_file_variation1.phpt create mode 100644 ext/standard/tests/file/is_file_variation2.phpt create mode 100644 ext/standard/tests/file/is_file_variation3.phpt create mode 100644 ext/standard/tests/file/is_file_variation4.phpt create mode 100644 ext/standard/tests/file/is_readable_basic-win32.phpt create mode 100644 ext/standard/tests/file/is_readable_basic.phpt create mode 100644 ext/standard/tests/file/is_readable_error.phpt create mode 100644 ext/standard/tests/file/is_readable_variation1.phpt create mode 100644 ext/standard/tests/file/is_readable_variation2.phpt create mode 100644 ext/standard/tests/file/is_readable_variation3.phpt create mode 100644 ext/standard/tests/file/is_uploaded_file_basic.phpt create mode 100644 ext/standard/tests/file/is_writable_basic.phpt create mode 100644 ext/standard/tests/file/is_writable_error.phpt create mode 100644 ext/standard/tests/file/is_writable_variation1.phpt create mode 100644 ext/standard/tests/file/is_writable_variation2.phpt create mode 100644 ext/standard/tests/file/is_writable_variation3.phpt create mode 100644 ext/standard/tests/file/lchgrp_basic.phpt create mode 100644 ext/standard/tests/file/lchown_basic.phpt create mode 100644 ext/standard/tests/file/lchown_error.phpt create mode 100644 ext/standard/tests/file/link_win32.phpt create mode 100644 ext/standard/tests/file/lstat_stat_basic.phpt create mode 100644 ext/standard/tests/file/lstat_stat_error.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation1.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation10.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation11.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation12.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation13.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation14.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation15.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation16.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation17.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation18.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation19.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation2.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation20.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation21.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation22.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation3.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation4.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation5.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation6.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation7.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation8.phpt create mode 100644 ext/standard/tests/file/lstat_stat_variation9.phpt create mode 100644 ext/standard/tests/file/mkdir-001.phpt create mode 100644 ext/standard/tests/file/mkdir-002.phpt create mode 100644 ext/standard/tests/file/mkdir-003.phpt create mode 100644 ext/standard/tests/file/mkdir-004.phpt create mode 100644 ext/standard/tests/file/mkdir-005.phpt create mode 100644 ext/standard/tests/file/mkdir-006.phpt create mode 100644 ext/standard/tests/file/mkdir_rmdir_error.phpt create mode 100644 ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt create mode 100644 ext/standard/tests/file/mkdir_rmdir_variation1.phpt create mode 100644 ext/standard/tests/file/mkdir_rmdir_variation2.phpt create mode 100644 ext/standard/tests/file/mkdir_variation1-win32.phpt create mode 100644 ext/standard/tests/file/mkdir_variation1.phpt create mode 100644 ext/standard/tests/file/mkdir_variation2.phpt create mode 100644 ext/standard/tests/file/mkdir_variation3.phpt create mode 100644 ext/standard/tests/file/mkdir_variation4.phpt create mode 100644 ext/standard/tests/file/mkdir_variation5-win32.phpt create mode 100644 ext/standard/tests/file/mkdir_variation5.phpt create mode 100644 ext/standard/tests/file/move_uploaded_file_basic.phpt create mode 100644 ext/standard/tests/file/parse_ini_file.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_error.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_variation1.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_variation2.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_variation3.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_variation4.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_variation5.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_variation6-win32.phpt create mode 100644 ext/standard/tests/file/parse_ini_file_variation6.phpt create mode 100644 ext/standard/tests/file/pathinfo_basic.phpt create mode 100644 ext/standard/tests/file/pathinfo_basic1-win32.phpt create mode 100644 ext/standard/tests/file/pathinfo_basic1.phpt create mode 100644 ext/standard/tests/file/pathinfo_basic2-win32.phpt create mode 100644 ext/standard/tests/file/pathinfo_basic2.phpt create mode 100644 ext/standard/tests/file/pathinfo_error.phpt create mode 100644 ext/standard/tests/file/pathinfo_variation1.phpt create mode 100644 ext/standard/tests/file/pathinfo_variation2.phpt create mode 100644 ext/standard/tests/file/pathinfo_variation3.phpt create mode 100644 ext/standard/tests/file/pathinfo_variaton.phpt create mode 100644 ext/standard/tests/file/pclose_variation1.phpt create mode 100644 ext/standard/tests/file/php_fd_wrapper_01.phpt create mode 100644 ext/standard/tests/file/php_fd_wrapper_02.phpt create mode 100644 ext/standard/tests/file/php_fd_wrapper_03.phpt create mode 100644 ext/standard/tests/file/php_fd_wrapper_04.phpt create mode 100644 ext/standard/tests/file/popen_pclose_basic-win32.phpt create mode 100644 ext/standard/tests/file/popen_pclose_basic.phpt create mode 100644 ext/standard/tests/file/popen_pclose_error-sunos.phpt create mode 100644 ext/standard/tests/file/popen_pclose_error-win32-debug.phpt create mode 100644 ext/standard/tests/file/popen_pclose_error-win32.phpt create mode 100644 ext/standard/tests/file/popen_pclose_error.phpt create mode 100644 ext/standard/tests/file/proc_open01.phpt create mode 100644 ext/standard/tests/file/readfile_basic-win32.phpt create mode 100644 ext/standard/tests/file/readfile_basic.phpt create mode 100644 ext/standard/tests/file/readfile_error.phpt create mode 100644 ext/standard/tests/file/readfile_variation1.phpt create mode 100644 ext/standard/tests/file/readfile_variation10-win32.phpt create mode 100644 ext/standard/tests/file/readfile_variation10.phpt create mode 100644 ext/standard/tests/file/readfile_variation2.phpt create mode 100644 ext/standard/tests/file/readfile_variation3.phpt create mode 100644 ext/standard/tests/file/readfile_variation4.phpt create mode 100644 ext/standard/tests/file/readfile_variation5.phpt create mode 100644 ext/standard/tests/file/readfile_variation6.phpt create mode 100644 ext/standard/tests/file/readfile_variation7.phpt create mode 100644 ext/standard/tests/file/readfile_variation8-win32.phpt create mode 100644 ext/standard/tests/file/readfile_variation9.phpt create mode 100644 ext/standard/tests/file/readlink_realpath_basic1.phpt create mode 100644 ext/standard/tests/file/readlink_realpath_basic2.phpt create mode 100644 ext/standard/tests/file/readlink_realpath_error.phpt create mode 100644 ext/standard/tests/file/readlink_realpath_variation1.phpt create mode 100644 ext/standard/tests/file/readlink_realpath_variation2.phpt create mode 100644 ext/standard/tests/file/readlink_realpath_variation3.phpt create mode 100644 ext/standard/tests/file/readlink_variation1.phpt create mode 100644 ext/standard/tests/file/realpath_basic-win32.phpt create mode 100644 ext/standard/tests/file/realpath_basic2.phpt create mode 100644 ext/standard/tests/file/realpath_basic3.phpt create mode 100644 ext/standard/tests/file/realpath_basic4.phpt create mode 100644 ext/standard/tests/file/realpath_cache.phpt create mode 100644 ext/standard/tests/file/realpath_cache_win32.phpt create mode 100644 ext/standard/tests/file/realpath_error-win32.phpt create mode 100644 ext/standard/tests/file/realpath_variation-win32.phpt create mode 100644 ext/standard/tests/file/realpath_variation2.phpt create mode 100644 ext/standard/tests/file/rename_basic.phpt create mode 100644 ext/standard/tests/file/rename_error.phpt create mode 100644 ext/standard/tests/file/rename_variation-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation.phpt create mode 100644 ext/standard/tests/file/rename_variation1-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation1.phpt create mode 100644 ext/standard/tests/file/rename_variation10.phpt create mode 100644 ext/standard/tests/file/rename_variation11-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation12-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation12.phpt create mode 100644 ext/standard/tests/file/rename_variation13-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation13.phpt create mode 100644 ext/standard/tests/file/rename_variation2-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation2.phpt create mode 100644 ext/standard/tests/file/rename_variation3-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation3.phpt create mode 100644 ext/standard/tests/file/rename_variation4.phpt create mode 100644 ext/standard/tests/file/rename_variation5.phpt create mode 100644 ext/standard/tests/file/rename_variation6-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation6.phpt create mode 100644 ext/standard/tests/file/rename_variation7-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation7.phpt create mode 100644 ext/standard/tests/file/rename_variation8-win32.phpt create mode 100644 ext/standard/tests/file/rename_variation8.phpt create mode 100644 ext/standard/tests/file/rename_variation9.phpt create mode 100644 ext/standard/tests/file/rmdir_variation1-win32.phpt create mode 100644 ext/standard/tests/file/rmdir_variation1.phpt create mode 100644 ext/standard/tests/file/rmdir_variation2.phpt create mode 100644 ext/standard/tests/file/rmdir_variation3-win32.phpt create mode 100644 ext/standard/tests/file/rmdir_variation3.phpt create mode 100644 ext/standard/tests/file/stat_basic-win32.phpt create mode 100644 ext/standard/tests/file/stat_error-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation1-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation2-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation3-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation4-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation5-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation6-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation7-win32.phpt create mode 100644 ext/standard/tests/file/stat_variation8-win32.phpt create mode 100644 ext/standard/tests/file/statcache-corruption.phpt create mode 100644 ext/standard/tests/file/statpage.phpt create mode 100644 ext/standard/tests/file/stream_001.phpt create mode 100644 ext/standard/tests/file/stream_002.phpt create mode 100644 ext/standard/tests/file/stream_copy_to_stream.phpt create mode 100644 ext/standard/tests/file/stream_enclosed.phpt create mode 100644 ext/standard/tests/file/stream_get_line.phpt create mode 100644 ext/standard/tests/file/stream_rfc2397_001.phpt create mode 100644 ext/standard/tests/file/stream_rfc2397_002.phpt create mode 100755 ext/standard/tests/file/stream_rfc2397_003.gif create mode 100644 ext/standard/tests/file/stream_rfc2397_003.phpt create mode 100644 ext/standard/tests/file/stream_rfc2397_004.phpt create mode 100644 ext/standard/tests/file/stream_rfc2397_005.phpt create mode 100644 ext/standard/tests/file/stream_rfc2397_006.phpt create mode 100644 ext/standard/tests/file/stream_rfc2397_007.phpt create mode 100644 ext/standard/tests/file/stream_supports_lock.phpt create mode 100644 ext/standard/tests/file/symlink.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt create mode 100644 ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt create mode 100644 ext/standard/tests/file/symlink_to_symlink.phpt create mode 100644 ext/standard/tests/file/tempnam_error.phpt create mode 100644 ext/standard/tests/file/tempnam_variation1-win32.phpt create mode 100644 ext/standard/tests/file/tempnam_variation1.phpt create mode 100644 ext/standard/tests/file/tempnam_variation2-win32.phpt create mode 100644 ext/standard/tests/file/tempnam_variation2.phpt create mode 100644 ext/standard/tests/file/tempnam_variation3-win32.phpt create mode 100644 ext/standard/tests/file/tempnam_variation3.phpt create mode 100644 ext/standard/tests/file/tempnam_variation4.phpt create mode 100644 ext/standard/tests/file/tempnam_variation5-win32.phpt create mode 100644 ext/standard/tests/file/tempnam_variation5.phpt create mode 100644 ext/standard/tests/file/tempnam_variation6-win32.phpt create mode 100644 ext/standard/tests/file/tempnam_variation6.phpt create mode 100644 ext/standard/tests/file/tempnam_variation7-win32.phpt create mode 100644 ext/standard/tests/file/tempnam_variation7.phpt create mode 100644 ext/standard/tests/file/tempnam_variation8-win32.phpt create mode 100644 ext/standard/tests/file/test.csv create mode 100644 ext/standard/tests/file/test2.csv create mode 100644 ext/standard/tests/file/test3.csv create mode 100644 ext/standard/tests/file/touch.phpt create mode 100644 ext/standard/tests/file/touch_basic-win32.phpt create mode 100644 ext/standard/tests/file/touch_basic.phpt create mode 100644 ext/standard/tests/file/touch_error.phpt create mode 100644 ext/standard/tests/file/touch_variation1.phpt create mode 100644 ext/standard/tests/file/touch_variation2.phpt create mode 100644 ext/standard/tests/file/touch_variation3-win32.phpt create mode 100644 ext/standard/tests/file/touch_variation3.phpt create mode 100644 ext/standard/tests/file/touch_variation4-win32.phpt create mode 100644 ext/standard/tests/file/touch_variation4.phpt create mode 100644 ext/standard/tests/file/touch_variation5-win32.phpt create mode 100644 ext/standard/tests/file/touch_variation5.phpt create mode 100644 ext/standard/tests/file/touch_variation6-win32.phpt create mode 100644 ext/standard/tests/file/umask_basic.phpt create mode 100644 ext/standard/tests/file/umask_error.phpt create mode 100644 ext/standard/tests/file/umask_variation1.phpt create mode 100644 ext/standard/tests/file/umask_variation2.phpt create mode 100644 ext/standard/tests/file/umask_variation3.phpt create mode 100644 ext/standard/tests/file/unlink_basic.phpt create mode 100644 ext/standard/tests/file/unlink_error-win32.phpt create mode 100644 ext/standard/tests/file/unlink_error.phpt create mode 100644 ext/standard/tests/file/unlink_variation1-win32.phpt create mode 100644 ext/standard/tests/file/unlink_variation1.phpt create mode 100644 ext/standard/tests/file/unlink_variation10.phpt create mode 100644 ext/standard/tests/file/unlink_variation2-win32.phpt create mode 100644 ext/standard/tests/file/unlink_variation2.phpt create mode 100644 ext/standard/tests/file/unlink_variation3.phpt create mode 100644 ext/standard/tests/file/unlink_variation4.phpt create mode 100644 ext/standard/tests/file/unlink_variation5.phpt create mode 100644 ext/standard/tests/file/unlink_variation6.phpt create mode 100644 ext/standard/tests/file/unlink_variation7.phpt create mode 100644 ext/standard/tests/file/unlink_variation8-win32.phpt create mode 100644 ext/standard/tests/file/unlink_variation8.phpt create mode 100644 ext/standard/tests/file/unlink_variation9-win32.phpt create mode 100644 ext/standard/tests/file/userdirstream.phpt create mode 100644 ext/standard/tests/file/userfilters.phpt create mode 100644 ext/standard/tests/file/userstreams.phpt create mode 100644 ext/standard/tests/file/userstreams_002.phpt create mode 100644 ext/standard/tests/file/userstreams_003.phpt create mode 100644 ext/standard/tests/file/userstreams_004.phpt create mode 100644 ext/standard/tests/file/userstreams_005.phpt create mode 100644 ext/standard/tests/file/userstreams_006.phpt create mode 100644 ext/standard/tests/file/userstreams_007.phpt create mode 100644 ext/standard/tests/file/userwrapper.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859_2.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859_3.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859_4.phpt create mode 100644 ext/standard/tests/file/windows_acls/common.inc create mode 100644 ext/standard/tests/file/windows_acls/tiny.bat create mode 100644 ext/standard/tests/file/windows_acls/tiny.exe create mode 100644 ext/standard/tests/file/windows_links/bug48746.phpt create mode 100644 ext/standard/tests/file/windows_links/bug48746_1.phpt create mode 100644 ext/standard/tests/file/windows_links/bug48746_2.phpt create mode 100644 ext/standard/tests/file/windows_links/bug48746_3.phpt create mode 100644 ext/standard/tests/file/windows_links/common.inc (limited to 'ext/standard/tests/file') diff --git a/ext/standard/tests/file/001-win32.phpt b/ext/standard/tests/file/001-win32.phpt new file mode 100644 index 0000000..ee52094 --- /dev/null +++ b/ext/standard/tests/file/001-win32.phpt @@ -0,0 +1,100 @@ +--TEST-- +File type functions +--CREDITS-- +Dave Kelsey +--SKIPIF-- + +--FILE-- + +--EXPECT-- +test.file does not exist +test.file exists +test.file is not a symlink +test.file exists +test.file is file +test.file permissions are 0666 +test.file size is 0 +test.file is writeable +test.file is readable +test.file is a regular file +../file is a directory +test.file is not a directory +test.file does not exist +test.file does not exist + diff --git a/ext/standard/tests/file/001.phpt b/ext/standard/tests/file/001.phpt new file mode 100644 index 0000000..d604699 --- /dev/null +++ b/ext/standard/tests/file/001.phpt @@ -0,0 +1,146 @@ +--TEST-- +File type functions +--SKIPIF-- + +--FILE-- + +--EXPECT-- +test.file does not exist +test.file exists +test.link exists +test.file is not a symlink +test.link is a symlink +test.file exists +test.link lstat and stat differ at element 1 +test.link lstat and stat differ at element 2 +test.link lstat and stat differ at element 7 +test.link lstat and stat differ at element 8 +test.link lstat and stat differ at element 9 +test.file is file +test.link is link +test.file permissions are 0744 +test.file size is 0 +test.file is writeable +test.file is readable +test.file is executable +test.file is a regular file +test.link is a regular file +test.link is not a directory +../file is a directory +test.file is not a directory +test.file does not exist +test.file does not exist diff --git a/ext/standard/tests/file/002.phpt b/ext/standard/tests/file/002.phpt new file mode 100644 index 0000000..134f541 --- /dev/null +++ b/ext/standard/tests/file/002.phpt @@ -0,0 +1,52 @@ +--TEST-- +File/Stream functions +--FILE-- + +--EXPECT-- +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah +blah blah blah blah blah blah blah diff --git a/ext/standard/tests/file/003.phpt b/ext/standard/tests/file/003.phpt new file mode 100644 index 0000000..8eeaa93 --- /dev/null +++ b/ext/standard/tests/file/003.phpt @@ -0,0 +1,41 @@ +--TEST-- +is_*() and file_exists() return values are boolean. +--FILE-- + +--EXPECT-- +boolean +boolean +boolean +boolean +boolean +boolean +boolean +boolean +boolean +boolean diff --git a/ext/standard/tests/file/004.phpt b/ext/standard/tests/file/004.phpt new file mode 100644 index 0000000..f1fab47 --- /dev/null +++ b/ext/standard/tests/file/004.phpt @@ -0,0 +1,61 @@ +--TEST-- +file_put_contents() test +--FILE-- + +--EXPECT-- +String Test: OK +Integer Test: OK +Float Test: OK +Bool Test: OK +Array Test: OK diff --git a/ext/standard/tests/file/005_basic.phpt b/ext/standard/tests/file/005_basic.phpt new file mode 100644 index 0000000..5ed1118 --- /dev/null +++ b/ext/standard/tests/file/005_basic.phpt @@ -0,0 +1,54 @@ +--TEST-- +Test fileatime(), filemtime(), filectime() & touch() functions : basic functionality +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing the basic functionality with file *** +%d:%s:%s:%d:%d:%d +%d:%s:%s:%d:%d:%d +%d:%s:%s:%d:%d:%d +%d:%s:%s:%d:%d:%d +*** Testing the basic functionality with dir *** +%d:%s:%s:%d:%d:%d +%d:%s:%s:%d:%d:%d +%d:%s:%s:%d:%d:%d +%d:%s:%s:%d:%d:%d + +*** Done *** diff --git a/ext/standard/tests/file/005_error.phpt b/ext/standard/tests/file/005_error.phpt new file mode 100644 index 0000000..fc4852e --- /dev/null +++ b/ext/standard/tests/file/005_error.phpt @@ -0,0 +1,126 @@ +--TEST-- +Test fileatime(), filemtime(), filectime() & touch() functions : error conditions +--FILE-- + +--EXPECTF-- +*** Testing error conditions *** + +-- Testing with Non-existing files -- +Warning: fileatime(): stat failed for /no/such/file/or/dir in %s on line %d +bool(false) + +Warning: filemtime(): stat failed for /no/such/file/or/dir in %s on line %d +bool(false) + +Warning: filectime(): stat failed for /no/such/file/or/dir in %s on line %d +bool(false) + +Warning: touch(): Unable to create file /no/such/file/or/dir because No such file or directory in %s on line %d +bool(false) + +Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: touch() expects at most 3 parameters, 4 given in %s on line %d +NULL + +-- Testing No.of arguments less than expected -- +Warning: fileatime() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: filemtime() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: filectime() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: touch() expects at least 1 parameter, 0 given in %s on line %d +NULL + +-- Testing No.of arguments greater than expected -- +Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: touch() expects at most 3 parameters, 4 given in %s on line %d +NULL + +Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: touch() expects at most 3 parameters, 4 given in %s on line %d +NULL + +Done + diff --git a/ext/standard/tests/file/005_variation-win32.phpt b/ext/standard/tests/file/005_variation-win32.phpt new file mode 100644 index 0000000..3455875 --- /dev/null +++ b/ext/standard/tests/file/005_variation-win32.phpt @@ -0,0 +1,221 @@ +--TEST-- +Test fileatime(), filemtime(), filectime() & touch() functions : usage variation +--SKIPIF-- + +--FILE-- + "; + print( @date( 'Y:M:D:H:i:s', fileatime($filename) ) )."\n"; + clearstatcache(); + echo "-- File modification time is => "; + print( @date( 'Y:M:D:H:i:s', filemtime($filename) ) )."\n"; + clearstatcache(); + echo "-- inode change time is => "; + print( @date( 'Y:M:D:H:i:s', filectime($filename) ) )."\n"; + clearstatcache(); + +} + +echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; +$file_path = dirname(__FILE__); +// create files +$file_handle = fopen("$file_path/005_variation1.tmp", "w"); +fclose($file_handle); +stat_fn("$file_path/005_variation1.tmp"); +sleep(2); + +$file_handle = fopen("$file_path/005_variation2.tmp", "w"); +fclose($file_handle); +stat_fn("$file_path/005_variation2.tmp"); +sleep(2); + +$file_handle = fopen("$file_path/005_variation3.tmp", "w"); +fclose($file_handle); +stat_fn("$file_path/005_variation3.tmp"); + +// delete files +unlink("$file_path/005_variation1.tmp"); +unlink("$file_path/005_variation2.tmp"); +unlink("$file_path/005_variation3.tmp"); + +echo "\n-- Checking different times, just after creating the file --\n"; +$file_name = "$file_path/005_variation1.tmp"; +$file_write_handle = fopen($file_name, "w"); +fclose($file_write_handle); +stat_fn($file_name); +sleep(2); + +/* filectime + 2 */ +echo "\n-- Checking different times, after changing the file permission --\n"; +chmod($file_name, 0777); +stat_fn($file_name); +sleep(2); + +/* filemtime + 2 & filectime + 2 */ +echo "\n-- Checking different times, after writing into the file --\n"; +$file_write_handle = fopen($file_name, "w"); +fwrite($file_write_handle, b"Hello, world"); +fclose($file_write_handle); +stat_fn($file_name); +sleep(2); + +/* fileatime + 2 */ +echo "\n-- Checking different times, after reading from the file --\n"; +$file_read_handle = fopen($file_name ,"r"); +fread($file_read_handle, 10); +fclose( $file_read_handle); +stat_fn($file_name); +sleep(2); + +/* No change */ +echo "\n-- Checking different times, after making a copy of the file --\n"; +$file_copy = "$file_path/005_variation_copy.tmp"; +copy($file_name, $file_copy); +stat_fn($file_name); +sleep(2); + +/* fileatime + 2 */ +echo "\n-- Checking different times, after performing is_file() operation on the file --\n"; +is_file($file_name); +stat_fn($file_name); +sleep(2); + + +echo "\n*** Testing touch() function with different time values ***\n"; +$file_name2 = $file_path."/005_variation_touch.tmp"; +$file_handle = fopen($file_name2, "w"); +fclose($file_handle); +sleep(2); + +/* Time is not mentioned */ +var_dump( touch($file_name2) ); //set to current system time +stat_fn($file_name2); +sleep(2); + +/* set to access(creation time of the file) time */ +var_dump( touch($file_name2, @date(fileatime($file_name2))) ); +stat_fn($file_name2); +sleep(2); + +/* set to access time of $file_name2 */ +var_dump( touch($file_path."/005_variation_touch_fly.tmp", @date(fileatime($file_name2)), time()) ); +stat_fn($file_name2); +sleep(2); + +/* set to default value, with Invalid timestamps */ +var_dump( touch($file_name2, 10) ); +stat_fn($file_name2); +var_dump( touch($file_name2, 10, 20) ); +stat_fn($file_name2); + +/* touch() after renaming the file */ +rename($file_name2, "$file_path/005_variation_touch_new.tmp"); +stat_fn("$file_path/005_variation_touch_new.tmp"); + +echo "Done\n"; +?> +--CLEAN-- + +--EXPECTF-- +*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations *** +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, just after creating the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after changing the file permission -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after writing into the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after reading from the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after making a copy of the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after performing is_file() operation on the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +*** Testing touch() function with different time values *** +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +Done diff --git a/ext/standard/tests/file/005_variation.phpt b/ext/standard/tests/file/005_variation.phpt new file mode 100644 index 0000000..7e5eedc --- /dev/null +++ b/ext/standard/tests/file/005_variation.phpt @@ -0,0 +1,260 @@ +--TEST-- +Test fileatime(), filemtime(), filectime() & touch() functions : usage variation +--SKIPIF-- + +--FILE-- + "; + print( @date( 'Y:M:D:H:i:s', fileatime($filename) ) )."\n"; + clearstatcache(); + echo "-- File modification time is => "; + print( @date( 'Y:M:D:H:i:s', filemtime($filename) ) )."\n"; + clearstatcache(); + echo "-- inode change time is => "; + print( @date( 'Y:M:D:H:i:s', filectime($filename) ) )."\n"; + clearstatcache(); + +} + +echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; +$file_path = dirname(__FILE__); +// create files +$file_handle = fopen("$file_path/005_variation1.tmp", "w"); +fclose($file_handle); +stat_fn("$file_path/005_variation1.tmp"); +sleep(2); + +$file_handle = fopen("$file_path/005_variation2.tmp", "w"); +fclose($file_handle); +stat_fn("$file_path/005_variation2.tmp"); +sleep(2); + +$file_handle = fopen("$file_path/005_variation3.tmp", "w"); +fclose($file_handle); +stat_fn("$file_path/005_variation3.tmp"); + +// delete files +unlink("$file_path/005_variation1.tmp"); +unlink("$file_path/005_variation2.tmp"); +unlink("$file_path/005_variation3.tmp"); + +echo "\n-- Checking different times, just after creating the file --\n"; +$file_name = "$file_path/005_variation1.tmp"; +$file_write_handle = fopen($file_name, "w"); +fclose($file_write_handle); +stat_fn($file_name); +sleep(2); + +/* filectime + 2 */ +echo "\n-- Checking different times, after changing the file permission --\n"; +chmod($file_name, 0777); +stat_fn($file_name); +sleep(2); + +/* filemtime + 2 & filectime + 2 */ +echo "\n-- Checking different times, after writing into the file --\n"; +$file_write_handle = fopen($file_name, "w"); +fwrite($file_write_handle, "Hello, world"); +fclose($file_write_handle); +stat_fn($file_name); +sleep(2); + +/* fileatime + 2 */ +echo "\n-- Checking different times, after reading from the file --\n"; +$file_read_handle = fopen($file_name ,"r"); +fread($file_read_handle, 10); +fclose( $file_read_handle); +stat_fn($file_name); +sleep(2); + +/* No change */ +echo "\n-- Checking different times, after creating a softlink to the file --\n"; +symlink($file_name, "$file_path/005_variation_softlink.tmp"); +stat_fn($file_name); +sleep(2); + +/* filectime + 2 */ +echo "\n-- Checking different times, after creating a hardlink to the file --\n"; +link($file_name, "$file_path/005_variation_hardlink.tmp"); +stat_fn($file_name); +sleep(2); + +/* No change */ +echo "\n-- Checking different times, after making a copy of the file --\n"; +$file_copy = "$file_path/005_variation_copy.tmp"; +copy($file_name, $file_copy); +stat_fn($file_name); +sleep(2); + +/* fileatime + 2 */ +echo "\n-- Checking different times, after performing is_file() operation on the file --\n"; +is_file($file_name); +stat_fn($file_name); +sleep(2); + + +echo "\n*** Testing touch() function with different time values ***\n"; +$file_name2 = $file_path."/005_variation_touch.tmp"; +$file_handle = fopen($file_name2, "w"); +fclose($file_handle); +sleep(2); + +/* Time is not mentioned */ +var_dump( touch($file_name2) ); //set to current system time +stat_fn($file_name2); +sleep(2); + +/* set to access(creation time of the file) time */ +var_dump( touch($file_name2, @date(fileatime($file_name2))) ); +stat_fn($file_name2); +sleep(2); + +/* set to access time of $file_name2 */ +var_dump( touch($file_path."/005_variation_touch_fly.tmp", @date(fileatime($file_name2)), time()) ); +stat_fn($file_name2); +sleep(2); + +/* set to default value, with Invalid timestamps */ +var_dump( touch($file_name2, 10) ); +stat_fn($file_name2); +var_dump( touch($file_name2, 10, 20) ); +stat_fn($file_name2); + +/* touch() after renaming the file */ +rename($file_name2, "$file_path/005_variation_touch_new.tmp"); +stat_fn("$file_path/005_variation_touch_new.tmp"); + +echo "Done\n"; +?> +--CLEAN-- + +--EXPECTF-- +*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations *** +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, just after creating the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after changing the file permission -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after writing into the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after reading from the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after creating a softlink to the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after creating a hardlink to the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after making a copy of the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +-- Checking different times, after performing is_file() operation on the file -- +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d + +*** Testing touch() function with different time values *** +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +bool(true) +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +-- File access time is => %d:%s:%s:%d:%d:%d +-- File modification time is => %d:%s:%s:%d:%d:%d +-- inode change time is => %d:%s:%s:%d:%d:%d +Done diff --git a/ext/standard/tests/file/005_variation2-win32.phpt b/ext/standard/tests/file/005_variation2-win32.phpt new file mode 100644 index 0000000..8508ecf --- /dev/null +++ b/ext/standard/tests/file/005_variation2-win32.phpt @@ -0,0 +1,119 @@ +--TEST-- +Test fileatime(), filemtime(), filectime() & touch() functions : usage variation +--CREDITS-- +Dave Kelsey +--SKIPIF-- + +--FILE-- + "; + echo fileatime($filename)."\n"; + clearstatcache(); + echo "-- File modification time is => "; + echo filemtime($filename)."\n"; + clearstatcache(); + echo "-- inode change time is => "; + echo filectime($filename)."\n"; + clearstatcache(); + + +} + +echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; +echo "\n*** testing file info ***"; +stat_fn(NULL); +stat_fn(false); +stat_fn(''); +stat_fn(' '); +stat_fn('|'); +echo "\n*** testing touch ***"; +var_dump(touch(NULL)); +var_dump(touch(false)); +var_dump(touch('')); + +//php generates permission denied, we generate No such file or dir. +var_dump(touch(' ')); +var_dump(touch('|')); + + +echo "Done"; +?> +--EXPECTF-- +*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations *** + +*** testing file info *** +-- File '' -- +-- File access time is => +-- File modification time is => +-- inode change time is => + +-- File '' -- +-- File access time is => +-- File modification time is => +-- inode change time is => + +-- File '' -- +-- File access time is => +-- File modification time is => +-- inode change time is => + +-- File ' ' -- +-- File access time is => +Warning: fileatime(): stat failed for in %s on line %d + +-- File modification time is => +Warning: filemtime(): stat failed for in %s on line %d + +-- inode change time is => +Warning: filectime(): stat failed for in %s on line %d + + +-- File '|' -- +-- File access time is => +Warning: fileatime(): stat failed for | in %s on line %d + +-- File modification time is => +Warning: filemtime(): stat failed for | in %s on line %d + +-- inode change time is => +Warning: filectime(): stat failed for | in %s on line %d + + +*** testing touch ***bool(false) +bool(false) +bool(false) + +Warning: touch(): %s in %s on line %d +bool(false) + +Warning: touch(): %s in %s on line %d +bool(false) +Done diff --git a/ext/standard/tests/file/005_variation2.phpt b/ext/standard/tests/file/005_variation2.phpt new file mode 100644 index 0000000..6d4ca5e --- /dev/null +++ b/ext/standard/tests/file/005_variation2.phpt @@ -0,0 +1,113 @@ +--TEST-- +Test fileatime(), filemtime(), filectime() & touch() functions : usage variation +--CREDITS-- +Dave Kelsey +--SKIPIF-- + +--FILE-- + "; + echo fileatime($filename)."\n"; + clearstatcache(); + echo "-- File modification time is => "; + echo filemtime($filename)."\n"; + clearstatcache(); + echo "-- inode change time is => "; + echo filectime($filename)."\n"; + clearstatcache(); + + +} + +echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; +echo "\n*** testing touch ***\n"; +$a = touch(NULL); +$b = touch(false); +$c = touch(''); +$d = touch(' '); +$e = touch('|'); + +var_dump($a); +var_dump($b); +var_dump($c); +var_dump($d); +var_dump($e); + +echo "\n*** testing file info ***"; +stat_fn(NULL); +stat_fn(false); +stat_fn(''); +stat_fn(' '); +stat_fn('|'); + +var_dump(unlink(' ')); +var_dump(unlink('|')); + +echo "Done"; +?> +--EXPECTF-- +*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations *** + +*** testing touch *** +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) + +*** testing file info *** +-- File '' -- +-- File access time is => +-- File modification time is => +-- inode change time is => + +-- File '' -- +-- File access time is => +-- File modification time is => +-- inode change time is => + +-- File '' -- +-- File access time is => +-- File modification time is => +-- inode change time is => + +-- File ' ' -- +-- File access time is => %d +-- File modification time is => %d +-- inode change time is => %d + +-- File '|' -- +-- File access time is => %d +-- File modification time is => %d +-- inode change time is => %d +bool(true) +bool(true) +Done diff --git a/ext/standard/tests/file/006_basic.phpt b/ext/standard/tests/file/006_basic.phpt new file mode 100644 index 0000000..213442c --- /dev/null +++ b/ext/standard/tests/file/006_basic.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fileperms() & chmod() functions: basic functionality +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing fileperms(), chmod() with files and dirs *** +bool(true) +100755 +bool(true) +40777 +Done diff --git a/ext/standard/tests/file/006_error.phpt b/ext/standard/tests/file/006_error.phpt new file mode 100644 index 0000000..04cc274 --- /dev/null +++ b/ext/standard/tests/file/006_error.phpt @@ -0,0 +1,107 @@ +--TEST-- +Test fileperms(), chmod() functions: error conditions +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing error conditions for fileperms(), chmod() *** + +Warning: chmod(): %s in %s on line %d +bool(false) +100%d44 + +Warning: chmod(): %s in %s on line %d +bool(false) +40755 + +Warning: chmod(): No such file or directory in %s on line %d +bool(false) + +Warning: fileperms(): stat failed for /no/such/file/dir in %s on line %d +bool(false) + + +Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d +NULL + +Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d +NULL + +Warning: chmod() expects exactly 2 parameters, 0 given in %s on line %d +NULL + +Warning: fileperms() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: chmod() expects exactly 2 parameters, 3 given in %s on line %d +NULL + +Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +*** Done *** diff --git a/ext/standard/tests/file/006_variation1.phpt b/ext/standard/tests/file/006_variation1.phpt new file mode 100644 index 0000000..b752d21 --- /dev/null +++ b/ext/standard/tests/file/006_variation1.phpt @@ -0,0 +1,2627 @@ +--TEST-- +Test fileperms() & chmod() functions: usage variation - perms(0000-0777) +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing fileperms() & chmod() : usage variations *** +-- Testing all permission from octal 0000 to octal 0777 on file and dir -- +-- Iteration 1 -- +bool(true) +100000 +bool(true) +40000 +-- Iteration 2 -- +bool(true) +100001 +bool(true) +40001 +-- Iteration 3 -- +bool(true) +100002 +bool(true) +40002 +-- Iteration 4 -- +bool(true) +100003 +bool(true) +40003 +-- Iteration 5 -- +bool(true) +100004 +bool(true) +40004 +-- Iteration 6 -- +bool(true) +100005 +bool(true) +40005 +-- Iteration 7 -- +bool(true) +100006 +bool(true) +40006 +-- Iteration 8 -- +bool(true) +100007 +bool(true) +40007 +-- Iteration 9 -- +bool(true) +100010 +bool(true) +40010 +-- Iteration 10 -- +bool(true) +100011 +bool(true) +40011 +-- Iteration 11 -- +bool(true) +100012 +bool(true) +40012 +-- Iteration 12 -- +bool(true) +100013 +bool(true) +40013 +-- Iteration 13 -- +bool(true) +100014 +bool(true) +40014 +-- Iteration 14 -- +bool(true) +100015 +bool(true) +40015 +-- Iteration 15 -- +bool(true) +100016 +bool(true) +40016 +-- Iteration 16 -- +bool(true) +100017 +bool(true) +40017 +-- Iteration 17 -- +bool(true) +100020 +bool(true) +40020 +-- Iteration 18 -- +bool(true) +100021 +bool(true) +40021 +-- Iteration 19 -- +bool(true) +100022 +bool(true) +40022 +-- Iteration 20 -- +bool(true) +100023 +bool(true) +40023 +-- Iteration 21 -- +bool(true) +100024 +bool(true) +40024 +-- Iteration 22 -- +bool(true) +100025 +bool(true) +40025 +-- Iteration 23 -- +bool(true) +100026 +bool(true) +40026 +-- Iteration 24 -- +bool(true) +100027 +bool(true) +40027 +-- Iteration 25 -- +bool(true) +100030 +bool(true) +40030 +-- Iteration 26 -- +bool(true) +100031 +bool(true) +40031 +-- Iteration 27 -- +bool(true) +100032 +bool(true) +40032 +-- Iteration 28 -- +bool(true) +100033 +bool(true) +40033 +-- Iteration 29 -- +bool(true) +100034 +bool(true) +40034 +-- Iteration 30 -- +bool(true) +100035 +bool(true) +40035 +-- Iteration 31 -- +bool(true) +100036 +bool(true) +40036 +-- Iteration 32 -- +bool(true) +100037 +bool(true) +40037 +-- Iteration 33 -- +bool(true) +100040 +bool(true) +40040 +-- Iteration 34 -- +bool(true) +100041 +bool(true) +40041 +-- Iteration 35 -- +bool(true) +100042 +bool(true) +40042 +-- Iteration 36 -- +bool(true) +100043 +bool(true) +40043 +-- Iteration 37 -- +bool(true) +100044 +bool(true) +40044 +-- Iteration 38 -- +bool(true) +100045 +bool(true) +40045 +-- Iteration 39 -- +bool(true) +100046 +bool(true) +40046 +-- Iteration 40 -- +bool(true) +100047 +bool(true) +40047 +-- Iteration 41 -- +bool(true) +100050 +bool(true) +40050 +-- Iteration 42 -- +bool(true) +100051 +bool(true) +40051 +-- Iteration 43 -- +bool(true) +100052 +bool(true) +40052 +-- Iteration 44 -- +bool(true) +100053 +bool(true) +40053 +-- Iteration 45 -- +bool(true) +100054 +bool(true) +40054 +-- Iteration 46 -- +bool(true) +100055 +bool(true) +40055 +-- Iteration 47 -- +bool(true) +100056 +bool(true) +40056 +-- Iteration 48 -- +bool(true) +100057 +bool(true) +40057 +-- Iteration 49 -- +bool(true) +100060 +bool(true) +40060 +-- Iteration 50 -- +bool(true) +100061 +bool(true) +40061 +-- Iteration 51 -- +bool(true) +100062 +bool(true) +40062 +-- Iteration 52 -- +bool(true) +100063 +bool(true) +40063 +-- Iteration 53 -- +bool(true) +100064 +bool(true) +40064 +-- Iteration 54 -- +bool(true) +100065 +bool(true) +40065 +-- Iteration 55 -- +bool(true) +100066 +bool(true) +40066 +-- Iteration 56 -- +bool(true) +100067 +bool(true) +40067 +-- Iteration 57 -- +bool(true) +100070 +bool(true) +40070 +-- Iteration 58 -- +bool(true) +100071 +bool(true) +40071 +-- Iteration 59 -- +bool(true) +100072 +bool(true) +40072 +-- Iteration 60 -- +bool(true) +100073 +bool(true) +40073 +-- Iteration 61 -- +bool(true) +100074 +bool(true) +40074 +-- Iteration 62 -- +bool(true) +100075 +bool(true) +40075 +-- Iteration 63 -- +bool(true) +100076 +bool(true) +40076 +-- Iteration 64 -- +bool(true) +100077 +bool(true) +40077 +-- Iteration 65 -- +bool(true) +100100 +bool(true) +40100 +-- Iteration 66 -- +bool(true) +100101 +bool(true) +40101 +-- Iteration 67 -- +bool(true) +100102 +bool(true) +40102 +-- Iteration 68 -- +bool(true) +100103 +bool(true) +40103 +-- Iteration 69 -- +bool(true) +100104 +bool(true) +40104 +-- Iteration 70 -- +bool(true) +100105 +bool(true) +40105 +-- Iteration 71 -- +bool(true) +100106 +bool(true) +40106 +-- Iteration 72 -- +bool(true) +100107 +bool(true) +40107 +-- Iteration 73 -- +bool(true) +100110 +bool(true) +40110 +-- Iteration 74 -- +bool(true) +100111 +bool(true) +40111 +-- Iteration 75 -- +bool(true) +100112 +bool(true) +40112 +-- Iteration 76 -- +bool(true) +100113 +bool(true) +40113 +-- Iteration 77 -- +bool(true) +100114 +bool(true) +40114 +-- Iteration 78 -- +bool(true) +100115 +bool(true) +40115 +-- Iteration 79 -- +bool(true) +100116 +bool(true) +40116 +-- Iteration 80 -- +bool(true) +100117 +bool(true) +40117 +-- Iteration 81 -- +bool(true) +100120 +bool(true) +40120 +-- Iteration 82 -- +bool(true) +100121 +bool(true) +40121 +-- Iteration 83 -- +bool(true) +100122 +bool(true) +40122 +-- Iteration 84 -- +bool(true) +100123 +bool(true) +40123 +-- Iteration 85 -- +bool(true) +100124 +bool(true) +40124 +-- Iteration 86 -- +bool(true) +100125 +bool(true) +40125 +-- Iteration 87 -- +bool(true) +100126 +bool(true) +40126 +-- Iteration 88 -- +bool(true) +100127 +bool(true) +40127 +-- Iteration 89 -- +bool(true) +100130 +bool(true) +40130 +-- Iteration 90 -- +bool(true) +100131 +bool(true) +40131 +-- Iteration 91 -- +bool(true) +100132 +bool(true) +40132 +-- Iteration 92 -- +bool(true) +100133 +bool(true) +40133 +-- Iteration 93 -- +bool(true) +100134 +bool(true) +40134 +-- Iteration 94 -- +bool(true) +100135 +bool(true) +40135 +-- Iteration 95 -- +bool(true) +100136 +bool(true) +40136 +-- Iteration 96 -- +bool(true) +100137 +bool(true) +40137 +-- Iteration 97 -- +bool(true) +100140 +bool(true) +40140 +-- Iteration 98 -- +bool(true) +100141 +bool(true) +40141 +-- Iteration 99 -- +bool(true) +100142 +bool(true) +40142 +-- Iteration 100 -- +bool(true) +100143 +bool(true) +40143 +-- Iteration 101 -- +bool(true) +100144 +bool(true) +40144 +-- Iteration 102 -- +bool(true) +100145 +bool(true) +40145 +-- Iteration 103 -- +bool(true) +100146 +bool(true) +40146 +-- Iteration 104 -- +bool(true) +100147 +bool(true) +40147 +-- Iteration 105 -- +bool(true) +100150 +bool(true) +40150 +-- Iteration 106 -- +bool(true) +100151 +bool(true) +40151 +-- Iteration 107 -- +bool(true) +100152 +bool(true) +40152 +-- Iteration 108 -- +bool(true) +100153 +bool(true) +40153 +-- Iteration 109 -- +bool(true) +100154 +bool(true) +40154 +-- Iteration 110 -- +bool(true) +100155 +bool(true) +40155 +-- Iteration 111 -- +bool(true) +100156 +bool(true) +40156 +-- Iteration 112 -- +bool(true) +100157 +bool(true) +40157 +-- Iteration 113 -- +bool(true) +100160 +bool(true) +40160 +-- Iteration 114 -- +bool(true) +100161 +bool(true) +40161 +-- Iteration 115 -- +bool(true) +100162 +bool(true) +40162 +-- Iteration 116 -- +bool(true) +100163 +bool(true) +40163 +-- Iteration 117 -- +bool(true) +100164 +bool(true) +40164 +-- Iteration 118 -- +bool(true) +100165 +bool(true) +40165 +-- Iteration 119 -- +bool(true) +100166 +bool(true) +40166 +-- Iteration 120 -- +bool(true) +100167 +bool(true) +40167 +-- Iteration 121 -- +bool(true) +100170 +bool(true) +40170 +-- Iteration 122 -- +bool(true) +100171 +bool(true) +40171 +-- Iteration 123 -- +bool(true) +100172 +bool(true) +40172 +-- Iteration 124 -- +bool(true) +100173 +bool(true) +40173 +-- Iteration 125 -- +bool(true) +100174 +bool(true) +40174 +-- Iteration 126 -- +bool(true) +100175 +bool(true) +40175 +-- Iteration 127 -- +bool(true) +100176 +bool(true) +40176 +-- Iteration 128 -- +bool(true) +100177 +bool(true) +40177 +-- Iteration 129 -- +bool(true) +100200 +bool(true) +40200 +-- Iteration 130 -- +bool(true) +100201 +bool(true) +40201 +-- Iteration 131 -- +bool(true) +100202 +bool(true) +40202 +-- Iteration 132 -- +bool(true) +100203 +bool(true) +40203 +-- Iteration 133 -- +bool(true) +100204 +bool(true) +40204 +-- Iteration 134 -- +bool(true) +100205 +bool(true) +40205 +-- Iteration 135 -- +bool(true) +100206 +bool(true) +40206 +-- Iteration 136 -- +bool(true) +100207 +bool(true) +40207 +-- Iteration 137 -- +bool(true) +100210 +bool(true) +40210 +-- Iteration 138 -- +bool(true) +100211 +bool(true) +40211 +-- Iteration 139 -- +bool(true) +100212 +bool(true) +40212 +-- Iteration 140 -- +bool(true) +100213 +bool(true) +40213 +-- Iteration 141 -- +bool(true) +100214 +bool(true) +40214 +-- Iteration 142 -- +bool(true) +100215 +bool(true) +40215 +-- Iteration 143 -- +bool(true) +100216 +bool(true) +40216 +-- Iteration 144 -- +bool(true) +100217 +bool(true) +40217 +-- Iteration 145 -- +bool(true) +100220 +bool(true) +40220 +-- Iteration 146 -- +bool(true) +100221 +bool(true) +40221 +-- Iteration 147 -- +bool(true) +100222 +bool(true) +40222 +-- Iteration 148 -- +bool(true) +100223 +bool(true) +40223 +-- Iteration 149 -- +bool(true) +100224 +bool(true) +40224 +-- Iteration 150 -- +bool(true) +100225 +bool(true) +40225 +-- Iteration 151 -- +bool(true) +100226 +bool(true) +40226 +-- Iteration 152 -- +bool(true) +100227 +bool(true) +40227 +-- Iteration 153 -- +bool(true) +100230 +bool(true) +40230 +-- Iteration 154 -- +bool(true) +100231 +bool(true) +40231 +-- Iteration 155 -- +bool(true) +100232 +bool(true) +40232 +-- Iteration 156 -- +bool(true) +100233 +bool(true) +40233 +-- Iteration 157 -- +bool(true) +100234 +bool(true) +40234 +-- Iteration 158 -- +bool(true) +100235 +bool(true) +40235 +-- Iteration 159 -- +bool(true) +100236 +bool(true) +40236 +-- Iteration 160 -- +bool(true) +100237 +bool(true) +40237 +-- Iteration 161 -- +bool(true) +100240 +bool(true) +40240 +-- Iteration 162 -- +bool(true) +100241 +bool(true) +40241 +-- Iteration 163 -- +bool(true) +100242 +bool(true) +40242 +-- Iteration 164 -- +bool(true) +100243 +bool(true) +40243 +-- Iteration 165 -- +bool(true) +100244 +bool(true) +40244 +-- Iteration 166 -- +bool(true) +100245 +bool(true) +40245 +-- Iteration 167 -- +bool(true) +100246 +bool(true) +40246 +-- Iteration 168 -- +bool(true) +100247 +bool(true) +40247 +-- Iteration 169 -- +bool(true) +100250 +bool(true) +40250 +-- Iteration 170 -- +bool(true) +100251 +bool(true) +40251 +-- Iteration 171 -- +bool(true) +100252 +bool(true) +40252 +-- Iteration 172 -- +bool(true) +100253 +bool(true) +40253 +-- Iteration 173 -- +bool(true) +100254 +bool(true) +40254 +-- Iteration 174 -- +bool(true) +100255 +bool(true) +40255 +-- Iteration 175 -- +bool(true) +100256 +bool(true) +40256 +-- Iteration 176 -- +bool(true) +100257 +bool(true) +40257 +-- Iteration 177 -- +bool(true) +100260 +bool(true) +40260 +-- Iteration 178 -- +bool(true) +100261 +bool(true) +40261 +-- Iteration 179 -- +bool(true) +100262 +bool(true) +40262 +-- Iteration 180 -- +bool(true) +100263 +bool(true) +40263 +-- Iteration 181 -- +bool(true) +100264 +bool(true) +40264 +-- Iteration 182 -- +bool(true) +100265 +bool(true) +40265 +-- Iteration 183 -- +bool(true) +100266 +bool(true) +40266 +-- Iteration 184 -- +bool(true) +100267 +bool(true) +40267 +-- Iteration 185 -- +bool(true) +100270 +bool(true) +40270 +-- Iteration 186 -- +bool(true) +100271 +bool(true) +40271 +-- Iteration 187 -- +bool(true) +100272 +bool(true) +40272 +-- Iteration 188 -- +bool(true) +100273 +bool(true) +40273 +-- Iteration 189 -- +bool(true) +100274 +bool(true) +40274 +-- Iteration 190 -- +bool(true) +100275 +bool(true) +40275 +-- Iteration 191 -- +bool(true) +100276 +bool(true) +40276 +-- Iteration 192 -- +bool(true) +100277 +bool(true) +40277 +-- Iteration 193 -- +bool(true) +100300 +bool(true) +40300 +-- Iteration 194 -- +bool(true) +100301 +bool(true) +40301 +-- Iteration 195 -- +bool(true) +100302 +bool(true) +40302 +-- Iteration 196 -- +bool(true) +100303 +bool(true) +40303 +-- Iteration 197 -- +bool(true) +100304 +bool(true) +40304 +-- Iteration 198 -- +bool(true) +100305 +bool(true) +40305 +-- Iteration 199 -- +bool(true) +100306 +bool(true) +40306 +-- Iteration 200 -- +bool(true) +100307 +bool(true) +40307 +-- Iteration 201 -- +bool(true) +100310 +bool(true) +40310 +-- Iteration 202 -- +bool(true) +100311 +bool(true) +40311 +-- Iteration 203 -- +bool(true) +100312 +bool(true) +40312 +-- Iteration 204 -- +bool(true) +100313 +bool(true) +40313 +-- Iteration 205 -- +bool(true) +100314 +bool(true) +40314 +-- Iteration 206 -- +bool(true) +100315 +bool(true) +40315 +-- Iteration 207 -- +bool(true) +100316 +bool(true) +40316 +-- Iteration 208 -- +bool(true) +100317 +bool(true) +40317 +-- Iteration 209 -- +bool(true) +100320 +bool(true) +40320 +-- Iteration 210 -- +bool(true) +100321 +bool(true) +40321 +-- Iteration 211 -- +bool(true) +100322 +bool(true) +40322 +-- Iteration 212 -- +bool(true) +100323 +bool(true) +40323 +-- Iteration 213 -- +bool(true) +100324 +bool(true) +40324 +-- Iteration 214 -- +bool(true) +100325 +bool(true) +40325 +-- Iteration 215 -- +bool(true) +100326 +bool(true) +40326 +-- Iteration 216 -- +bool(true) +100327 +bool(true) +40327 +-- Iteration 217 -- +bool(true) +100330 +bool(true) +40330 +-- Iteration 218 -- +bool(true) +100331 +bool(true) +40331 +-- Iteration 219 -- +bool(true) +100332 +bool(true) +40332 +-- Iteration 220 -- +bool(true) +100333 +bool(true) +40333 +-- Iteration 221 -- +bool(true) +100334 +bool(true) +40334 +-- Iteration 222 -- +bool(true) +100335 +bool(true) +40335 +-- Iteration 223 -- +bool(true) +100336 +bool(true) +40336 +-- Iteration 224 -- +bool(true) +100337 +bool(true) +40337 +-- Iteration 225 -- +bool(true) +100340 +bool(true) +40340 +-- Iteration 226 -- +bool(true) +100341 +bool(true) +40341 +-- Iteration 227 -- +bool(true) +100342 +bool(true) +40342 +-- Iteration 228 -- +bool(true) +100343 +bool(true) +40343 +-- Iteration 229 -- +bool(true) +100344 +bool(true) +40344 +-- Iteration 230 -- +bool(true) +100345 +bool(true) +40345 +-- Iteration 231 -- +bool(true) +100346 +bool(true) +40346 +-- Iteration 232 -- +bool(true) +100347 +bool(true) +40347 +-- Iteration 233 -- +bool(true) +100350 +bool(true) +40350 +-- Iteration 234 -- +bool(true) +100351 +bool(true) +40351 +-- Iteration 235 -- +bool(true) +100352 +bool(true) +40352 +-- Iteration 236 -- +bool(true) +100353 +bool(true) +40353 +-- Iteration 237 -- +bool(true) +100354 +bool(true) +40354 +-- Iteration 238 -- +bool(true) +100355 +bool(true) +40355 +-- Iteration 239 -- +bool(true) +100356 +bool(true) +40356 +-- Iteration 240 -- +bool(true) +100357 +bool(true) +40357 +-- Iteration 241 -- +bool(true) +100360 +bool(true) +40360 +-- Iteration 242 -- +bool(true) +100361 +bool(true) +40361 +-- Iteration 243 -- +bool(true) +100362 +bool(true) +40362 +-- Iteration 244 -- +bool(true) +100363 +bool(true) +40363 +-- Iteration 245 -- +bool(true) +100364 +bool(true) +40364 +-- Iteration 246 -- +bool(true) +100365 +bool(true) +40365 +-- Iteration 247 -- +bool(true) +100366 +bool(true) +40366 +-- Iteration 248 -- +bool(true) +100367 +bool(true) +40367 +-- Iteration 249 -- +bool(true) +100370 +bool(true) +40370 +-- Iteration 250 -- +bool(true) +100371 +bool(true) +40371 +-- Iteration 251 -- +bool(true) +100372 +bool(true) +40372 +-- Iteration 252 -- +bool(true) +100373 +bool(true) +40373 +-- Iteration 253 -- +bool(true) +100374 +bool(true) +40374 +-- Iteration 254 -- +bool(true) +100375 +bool(true) +40375 +-- Iteration 255 -- +bool(true) +100376 +bool(true) +40376 +-- Iteration 256 -- +bool(true) +100377 +bool(true) +40377 +-- Iteration 257 -- +bool(true) +100400 +bool(true) +40400 +-- Iteration 258 -- +bool(true) +100401 +bool(true) +40401 +-- Iteration 259 -- +bool(true) +100402 +bool(true) +40402 +-- Iteration 260 -- +bool(true) +100403 +bool(true) +40403 +-- Iteration 261 -- +bool(true) +100404 +bool(true) +40404 +-- Iteration 262 -- +bool(true) +100405 +bool(true) +40405 +-- Iteration 263 -- +bool(true) +100406 +bool(true) +40406 +-- Iteration 264 -- +bool(true) +100407 +bool(true) +40407 +-- Iteration 265 -- +bool(true) +100410 +bool(true) +40410 +-- Iteration 266 -- +bool(true) +100411 +bool(true) +40411 +-- Iteration 267 -- +bool(true) +100412 +bool(true) +40412 +-- Iteration 268 -- +bool(true) +100413 +bool(true) +40413 +-- Iteration 269 -- +bool(true) +100414 +bool(true) +40414 +-- Iteration 270 -- +bool(true) +100415 +bool(true) +40415 +-- Iteration 271 -- +bool(true) +100416 +bool(true) +40416 +-- Iteration 272 -- +bool(true) +100417 +bool(true) +40417 +-- Iteration 273 -- +bool(true) +100420 +bool(true) +40420 +-- Iteration 274 -- +bool(true) +100421 +bool(true) +40421 +-- Iteration 275 -- +bool(true) +100422 +bool(true) +40422 +-- Iteration 276 -- +bool(true) +100423 +bool(true) +40423 +-- Iteration 277 -- +bool(true) +100424 +bool(true) +40424 +-- Iteration 278 -- +bool(true) +100425 +bool(true) +40425 +-- Iteration 279 -- +bool(true) +100426 +bool(true) +40426 +-- Iteration 280 -- +bool(true) +100427 +bool(true) +40427 +-- Iteration 281 -- +bool(true) +100430 +bool(true) +40430 +-- Iteration 282 -- +bool(true) +100431 +bool(true) +40431 +-- Iteration 283 -- +bool(true) +100432 +bool(true) +40432 +-- Iteration 284 -- +bool(true) +100433 +bool(true) +40433 +-- Iteration 285 -- +bool(true) +100434 +bool(true) +40434 +-- Iteration 286 -- +bool(true) +100435 +bool(true) +40435 +-- Iteration 287 -- +bool(true) +100436 +bool(true) +40436 +-- Iteration 288 -- +bool(true) +100437 +bool(true) +40437 +-- Iteration 289 -- +bool(true) +100440 +bool(true) +40440 +-- Iteration 290 -- +bool(true) +100441 +bool(true) +40441 +-- Iteration 291 -- +bool(true) +100442 +bool(true) +40442 +-- Iteration 292 -- +bool(true) +100443 +bool(true) +40443 +-- Iteration 293 -- +bool(true) +100444 +bool(true) +40444 +-- Iteration 294 -- +bool(true) +100445 +bool(true) +40445 +-- Iteration 295 -- +bool(true) +100446 +bool(true) +40446 +-- Iteration 296 -- +bool(true) +100447 +bool(true) +40447 +-- Iteration 297 -- +bool(true) +100450 +bool(true) +40450 +-- Iteration 298 -- +bool(true) +100451 +bool(true) +40451 +-- Iteration 299 -- +bool(true) +100452 +bool(true) +40452 +-- Iteration 300 -- +bool(true) +100453 +bool(true) +40453 +-- Iteration 301 -- +bool(true) +100454 +bool(true) +40454 +-- Iteration 302 -- +bool(true) +100455 +bool(true) +40455 +-- Iteration 303 -- +bool(true) +100456 +bool(true) +40456 +-- Iteration 304 -- +bool(true) +100457 +bool(true) +40457 +-- Iteration 305 -- +bool(true) +100460 +bool(true) +40460 +-- Iteration 306 -- +bool(true) +100461 +bool(true) +40461 +-- Iteration 307 -- +bool(true) +100462 +bool(true) +40462 +-- Iteration 308 -- +bool(true) +100463 +bool(true) +40463 +-- Iteration 309 -- +bool(true) +100464 +bool(true) +40464 +-- Iteration 310 -- +bool(true) +100465 +bool(true) +40465 +-- Iteration 311 -- +bool(true) +100466 +bool(true) +40466 +-- Iteration 312 -- +bool(true) +100467 +bool(true) +40467 +-- Iteration 313 -- +bool(true) +100470 +bool(true) +40470 +-- Iteration 314 -- +bool(true) +100471 +bool(true) +40471 +-- Iteration 315 -- +bool(true) +100472 +bool(true) +40472 +-- Iteration 316 -- +bool(true) +100473 +bool(true) +40473 +-- Iteration 317 -- +bool(true) +100474 +bool(true) +40474 +-- Iteration 318 -- +bool(true) +100475 +bool(true) +40475 +-- Iteration 319 -- +bool(true) +100476 +bool(true) +40476 +-- Iteration 320 -- +bool(true) +100477 +bool(true) +40477 +-- Iteration 321 -- +bool(true) +100500 +bool(true) +40500 +-- Iteration 322 -- +bool(true) +100501 +bool(true) +40501 +-- Iteration 323 -- +bool(true) +100502 +bool(true) +40502 +-- Iteration 324 -- +bool(true) +100503 +bool(true) +40503 +-- Iteration 325 -- +bool(true) +100504 +bool(true) +40504 +-- Iteration 326 -- +bool(true) +100505 +bool(true) +40505 +-- Iteration 327 -- +bool(true) +100506 +bool(true) +40506 +-- Iteration 328 -- +bool(true) +100507 +bool(true) +40507 +-- Iteration 329 -- +bool(true) +100510 +bool(true) +40510 +-- Iteration 330 -- +bool(true) +100511 +bool(true) +40511 +-- Iteration 331 -- +bool(true) +100512 +bool(true) +40512 +-- Iteration 332 -- +bool(true) +100513 +bool(true) +40513 +-- Iteration 333 -- +bool(true) +100514 +bool(true) +40514 +-- Iteration 334 -- +bool(true) +100515 +bool(true) +40515 +-- Iteration 335 -- +bool(true) +100516 +bool(true) +40516 +-- Iteration 336 -- +bool(true) +100517 +bool(true) +40517 +-- Iteration 337 -- +bool(true) +100520 +bool(true) +40520 +-- Iteration 338 -- +bool(true) +100521 +bool(true) +40521 +-- Iteration 339 -- +bool(true) +100522 +bool(true) +40522 +-- Iteration 340 -- +bool(true) +100523 +bool(true) +40523 +-- Iteration 341 -- +bool(true) +100524 +bool(true) +40524 +-- Iteration 342 -- +bool(true) +100525 +bool(true) +40525 +-- Iteration 343 -- +bool(true) +100526 +bool(true) +40526 +-- Iteration 344 -- +bool(true) +100527 +bool(true) +40527 +-- Iteration 345 -- +bool(true) +100530 +bool(true) +40530 +-- Iteration 346 -- +bool(true) +100531 +bool(true) +40531 +-- Iteration 347 -- +bool(true) +100532 +bool(true) +40532 +-- Iteration 348 -- +bool(true) +100533 +bool(true) +40533 +-- Iteration 349 -- +bool(true) +100534 +bool(true) +40534 +-- Iteration 350 -- +bool(true) +100535 +bool(true) +40535 +-- Iteration 351 -- +bool(true) +100536 +bool(true) +40536 +-- Iteration 352 -- +bool(true) +100537 +bool(true) +40537 +-- Iteration 353 -- +bool(true) +100540 +bool(true) +40540 +-- Iteration 354 -- +bool(true) +100541 +bool(true) +40541 +-- Iteration 355 -- +bool(true) +100542 +bool(true) +40542 +-- Iteration 356 -- +bool(true) +100543 +bool(true) +40543 +-- Iteration 357 -- +bool(true) +100544 +bool(true) +40544 +-- Iteration 358 -- +bool(true) +100545 +bool(true) +40545 +-- Iteration 359 -- +bool(true) +100546 +bool(true) +40546 +-- Iteration 360 -- +bool(true) +100547 +bool(true) +40547 +-- Iteration 361 -- +bool(true) +100550 +bool(true) +40550 +-- Iteration 362 -- +bool(true) +100551 +bool(true) +40551 +-- Iteration 363 -- +bool(true) +100552 +bool(true) +40552 +-- Iteration 364 -- +bool(true) +100553 +bool(true) +40553 +-- Iteration 365 -- +bool(true) +100554 +bool(true) +40554 +-- Iteration 366 -- +bool(true) +100555 +bool(true) +40555 +-- Iteration 367 -- +bool(true) +100556 +bool(true) +40556 +-- Iteration 368 -- +bool(true) +100557 +bool(true) +40557 +-- Iteration 369 -- +bool(true) +100560 +bool(true) +40560 +-- Iteration 370 -- +bool(true) +100561 +bool(true) +40561 +-- Iteration 371 -- +bool(true) +100562 +bool(true) +40562 +-- Iteration 372 -- +bool(true) +100563 +bool(true) +40563 +-- Iteration 373 -- +bool(true) +100564 +bool(true) +40564 +-- Iteration 374 -- +bool(true) +100565 +bool(true) +40565 +-- Iteration 375 -- +bool(true) +100566 +bool(true) +40566 +-- Iteration 376 -- +bool(true) +100567 +bool(true) +40567 +-- Iteration 377 -- +bool(true) +100570 +bool(true) +40570 +-- Iteration 378 -- +bool(true) +100571 +bool(true) +40571 +-- Iteration 379 -- +bool(true) +100572 +bool(true) +40572 +-- Iteration 380 -- +bool(true) +100573 +bool(true) +40573 +-- Iteration 381 -- +bool(true) +100574 +bool(true) +40574 +-- Iteration 382 -- +bool(true) +100575 +bool(true) +40575 +-- Iteration 383 -- +bool(true) +100576 +bool(true) +40576 +-- Iteration 384 -- +bool(true) +100577 +bool(true) +40577 +-- Iteration 385 -- +bool(true) +100600 +bool(true) +40600 +-- Iteration 386 -- +bool(true) +100601 +bool(true) +40601 +-- Iteration 387 -- +bool(true) +100602 +bool(true) +40602 +-- Iteration 388 -- +bool(true) +100603 +bool(true) +40603 +-- Iteration 389 -- +bool(true) +100604 +bool(true) +40604 +-- Iteration 390 -- +bool(true) +100605 +bool(true) +40605 +-- Iteration 391 -- +bool(true) +100606 +bool(true) +40606 +-- Iteration 392 -- +bool(true) +100607 +bool(true) +40607 +-- Iteration 393 -- +bool(true) +100610 +bool(true) +40610 +-- Iteration 394 -- +bool(true) +100611 +bool(true) +40611 +-- Iteration 395 -- +bool(true) +100612 +bool(true) +40612 +-- Iteration 396 -- +bool(true) +100613 +bool(true) +40613 +-- Iteration 397 -- +bool(true) +100614 +bool(true) +40614 +-- Iteration 398 -- +bool(true) +100615 +bool(true) +40615 +-- Iteration 399 -- +bool(true) +100616 +bool(true) +40616 +-- Iteration 400 -- +bool(true) +100617 +bool(true) +40617 +-- Iteration 401 -- +bool(true) +100620 +bool(true) +40620 +-- Iteration 402 -- +bool(true) +100621 +bool(true) +40621 +-- Iteration 403 -- +bool(true) +100622 +bool(true) +40622 +-- Iteration 404 -- +bool(true) +100623 +bool(true) +40623 +-- Iteration 405 -- +bool(true) +100624 +bool(true) +40624 +-- Iteration 406 -- +bool(true) +100625 +bool(true) +40625 +-- Iteration 407 -- +bool(true) +100626 +bool(true) +40626 +-- Iteration 408 -- +bool(true) +100627 +bool(true) +40627 +-- Iteration 409 -- +bool(true) +100630 +bool(true) +40630 +-- Iteration 410 -- +bool(true) +100631 +bool(true) +40631 +-- Iteration 411 -- +bool(true) +100632 +bool(true) +40632 +-- Iteration 412 -- +bool(true) +100633 +bool(true) +40633 +-- Iteration 413 -- +bool(true) +100634 +bool(true) +40634 +-- Iteration 414 -- +bool(true) +100635 +bool(true) +40635 +-- Iteration 415 -- +bool(true) +100636 +bool(true) +40636 +-- Iteration 416 -- +bool(true) +100637 +bool(true) +40637 +-- Iteration 417 -- +bool(true) +100640 +bool(true) +40640 +-- Iteration 418 -- +bool(true) +100641 +bool(true) +40641 +-- Iteration 419 -- +bool(true) +100642 +bool(true) +40642 +-- Iteration 420 -- +bool(true) +100643 +bool(true) +40643 +-- Iteration 421 -- +bool(true) +100644 +bool(true) +40644 +-- Iteration 422 -- +bool(true) +100645 +bool(true) +40645 +-- Iteration 423 -- +bool(true) +100646 +bool(true) +40646 +-- Iteration 424 -- +bool(true) +100647 +bool(true) +40647 +-- Iteration 425 -- +bool(true) +100650 +bool(true) +40650 +-- Iteration 426 -- +bool(true) +100651 +bool(true) +40651 +-- Iteration 427 -- +bool(true) +100652 +bool(true) +40652 +-- Iteration 428 -- +bool(true) +100653 +bool(true) +40653 +-- Iteration 429 -- +bool(true) +100654 +bool(true) +40654 +-- Iteration 430 -- +bool(true) +100655 +bool(true) +40655 +-- Iteration 431 -- +bool(true) +100656 +bool(true) +40656 +-- Iteration 432 -- +bool(true) +100657 +bool(true) +40657 +-- Iteration 433 -- +bool(true) +100660 +bool(true) +40660 +-- Iteration 434 -- +bool(true) +100661 +bool(true) +40661 +-- Iteration 435 -- +bool(true) +100662 +bool(true) +40662 +-- Iteration 436 -- +bool(true) +100663 +bool(true) +40663 +-- Iteration 437 -- +bool(true) +100664 +bool(true) +40664 +-- Iteration 438 -- +bool(true) +100665 +bool(true) +40665 +-- Iteration 439 -- +bool(true) +100666 +bool(true) +40666 +-- Iteration 440 -- +bool(true) +100667 +bool(true) +40667 +-- Iteration 441 -- +bool(true) +100670 +bool(true) +40670 +-- Iteration 442 -- +bool(true) +100671 +bool(true) +40671 +-- Iteration 443 -- +bool(true) +100672 +bool(true) +40672 +-- Iteration 444 -- +bool(true) +100673 +bool(true) +40673 +-- Iteration 445 -- +bool(true) +100674 +bool(true) +40674 +-- Iteration 446 -- +bool(true) +100675 +bool(true) +40675 +-- Iteration 447 -- +bool(true) +100676 +bool(true) +40676 +-- Iteration 448 -- +bool(true) +100677 +bool(true) +40677 +-- Iteration 449 -- +bool(true) +100700 +bool(true) +40700 +-- Iteration 450 -- +bool(true) +100701 +bool(true) +40701 +-- Iteration 451 -- +bool(true) +100702 +bool(true) +40702 +-- Iteration 452 -- +bool(true) +100703 +bool(true) +40703 +-- Iteration 453 -- +bool(true) +100704 +bool(true) +40704 +-- Iteration 454 -- +bool(true) +100705 +bool(true) +40705 +-- Iteration 455 -- +bool(true) +100706 +bool(true) +40706 +-- Iteration 456 -- +bool(true) +100707 +bool(true) +40707 +-- Iteration 457 -- +bool(true) +100710 +bool(true) +40710 +-- Iteration 458 -- +bool(true) +100711 +bool(true) +40711 +-- Iteration 459 -- +bool(true) +100712 +bool(true) +40712 +-- Iteration 460 -- +bool(true) +100713 +bool(true) +40713 +-- Iteration 461 -- +bool(true) +100714 +bool(true) +40714 +-- Iteration 462 -- +bool(true) +100715 +bool(true) +40715 +-- Iteration 463 -- +bool(true) +100716 +bool(true) +40716 +-- Iteration 464 -- +bool(true) +100717 +bool(true) +40717 +-- Iteration 465 -- +bool(true) +100720 +bool(true) +40720 +-- Iteration 466 -- +bool(true) +100721 +bool(true) +40721 +-- Iteration 467 -- +bool(true) +100722 +bool(true) +40722 +-- Iteration 468 -- +bool(true) +100723 +bool(true) +40723 +-- Iteration 469 -- +bool(true) +100724 +bool(true) +40724 +-- Iteration 470 -- +bool(true) +100725 +bool(true) +40725 +-- Iteration 471 -- +bool(true) +100726 +bool(true) +40726 +-- Iteration 472 -- +bool(true) +100727 +bool(true) +40727 +-- Iteration 473 -- +bool(true) +100730 +bool(true) +40730 +-- Iteration 474 -- +bool(true) +100731 +bool(true) +40731 +-- Iteration 475 -- +bool(true) +100732 +bool(true) +40732 +-- Iteration 476 -- +bool(true) +100733 +bool(true) +40733 +-- Iteration 477 -- +bool(true) +100734 +bool(true) +40734 +-- Iteration 478 -- +bool(true) +100735 +bool(true) +40735 +-- Iteration 479 -- +bool(true) +100736 +bool(true) +40736 +-- Iteration 480 -- +bool(true) +100737 +bool(true) +40737 +-- Iteration 481 -- +bool(true) +100740 +bool(true) +40740 +-- Iteration 482 -- +bool(true) +100741 +bool(true) +40741 +-- Iteration 483 -- +bool(true) +100742 +bool(true) +40742 +-- Iteration 484 -- +bool(true) +100743 +bool(true) +40743 +-- Iteration 485 -- +bool(true) +100744 +bool(true) +40744 +-- Iteration 486 -- +bool(true) +100745 +bool(true) +40745 +-- Iteration 487 -- +bool(true) +100746 +bool(true) +40746 +-- Iteration 488 -- +bool(true) +100747 +bool(true) +40747 +-- Iteration 489 -- +bool(true) +100750 +bool(true) +40750 +-- Iteration 490 -- +bool(true) +100751 +bool(true) +40751 +-- Iteration 491 -- +bool(true) +100752 +bool(true) +40752 +-- Iteration 492 -- +bool(true) +100753 +bool(true) +40753 +-- Iteration 493 -- +bool(true) +100754 +bool(true) +40754 +-- Iteration 494 -- +bool(true) +100755 +bool(true) +40755 +-- Iteration 495 -- +bool(true) +100756 +bool(true) +40756 +-- Iteration 496 -- +bool(true) +100757 +bool(true) +40757 +-- Iteration 497 -- +bool(true) +100760 +bool(true) +40760 +-- Iteration 498 -- +bool(true) +100761 +bool(true) +40761 +-- Iteration 499 -- +bool(true) +100762 +bool(true) +40762 +-- Iteration 500 -- +bool(true) +100763 +bool(true) +40763 +-- Iteration 501 -- +bool(true) +100764 +bool(true) +40764 +-- Iteration 502 -- +bool(true) +100765 +bool(true) +40765 +-- Iteration 503 -- +bool(true) +100766 +bool(true) +40766 +-- Iteration 504 -- +bool(true) +100767 +bool(true) +40767 +-- Iteration 505 -- +bool(true) +100770 +bool(true) +40770 +-- Iteration 506 -- +bool(true) +100771 +bool(true) +40771 +-- Iteration 507 -- +bool(true) +100772 +bool(true) +40772 +-- Iteration 508 -- +bool(true) +100773 +bool(true) +40773 +-- Iteration 509 -- +bool(true) +100774 +bool(true) +40774 +-- Iteration 510 -- +bool(true) +100775 +bool(true) +40775 +-- Iteration 511 -- +bool(true) +100776 +bool(true) +40776 +-- Iteration 512 -- +bool(true) +100777 +bool(true) +40777 +*** Done *** diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt new file mode 100644 index 0000000..d56207a --- /dev/null +++ b/ext/standard/tests/file/006_variation2.phpt @@ -0,0 +1,186 @@ +--TEST-- +Test fileperms() & chmod() functions: usage variation - misc. perms +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing fileperms() & chmod() : usage variations *** + +*** Testing fileperms(), chmod() with miscellaneous permissions *** +-- Iteration 1 -- +bool(true) +107777 +bool(true) +47777 +-- Iteration 2 -- +bool(true) +100000 +bool(true) +40000 +-- Iteration 3 -- +bool(true) +101000 +bool(true) +41000 +-- Iteration 4 -- +bool(true) +101111 +bool(true) +41111 +-- Iteration 5 -- +bool(true) +107001 +bool(true) +47001 +-- Iteration 6 -- +bool(true) +100001 +bool(true) +40001 +-- Iteration 7 -- +bool(true) +101411 +bool(true) +41411 +-- Iteration 8 -- +bool(true) +107141 +bool(true) +47141 +-- Iteration 9 -- +bool(true) +100637 +bool(true) +40637 +-- Iteration 10 -- +bool(true) +103567 +bool(true) +43567 +-- Iteration 11 -- +bool(true) +103567 +bool(true) +43567 +-- Iteration 12 -- + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 +-- Iteration 13 -- + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 +-- Iteration 14 -- + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 +-- Iteration 15 -- + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 +*** Done *** diff --git a/ext/standard/tests/file/007_basic.phpt b/ext/standard/tests/file/007_basic.phpt new file mode 100644 index 0000000..eafadf7 --- /dev/null +++ b/ext/standard/tests/file/007_basic.phpt @@ -0,0 +1,412 @@ +--TEST-- +Test fopen(), fclose() & feof() functions: basic functionality +--FILE-- + +--FILE-- + +--EXPECTF-- +*** Testing error conditions for fopen(), fclsoe() & feof() *** + +Warning: fopen() expects at least 2 parameters, 1 given in %s on line %d +bool(false) + +Warning: fopen() expects at least 2 parameters, 0 given in %s on line %d +bool(false) + +Warning: fclose(): 5 is not a valid stream resource in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d +bool(false) + +Warning: fclose() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +Warning: feof(): 5 is not a valid stream resource in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, string given in %s on line %d +bool(false) + +Warning: feof() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +Warning: fopen() expects at most 4 parameters, 5 given in %s on line %d +bool(false) + +Warning: fclose() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +Warning: feof() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) +-- Testing fopen(), fclose() & feof() with invalid arguments -- +-- Iteration 1 -- + +Warning: fopen(string): failed to open stream: No such file or directory in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, string given in %s on line %d +bool(false) +-- Iteration 2 -- + +Warning: fopen(10): failed to open stream: No such file or directory in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, integer given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, integer given in %s on line %d +bool(false) +-- Iteration 3 -- + +Warning: fopen(10.5): failed to open stream: No such file or directory in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, double given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, double given in %s on line %d +bool(false) +-- Iteration 4 -- + +Warning: fopen(1): failed to open stream: No such file or directory in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, boolean given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, boolean given in %s on line %d +bool(false) +-- Iteration 5 -- + +Warning: fopen() expects parameter 1 to be a valid path, array given in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, array given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, array given in %s on line %d +bool(false) +-- Iteration 6 -- + +Warning: fopen() expects parameter 1 to be a valid path, object given in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, object given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, object given in %s on line %d +bool(false) +-- Iteration 7 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, null given in %s on line %d +bool(false) +-- Iteration 8 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d +bool(false) + +Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d +bool(false) + +Warning: feof() expects parameter 1 to be resource, string given in %s on line %d +bool(false) diff --git a/ext/standard/tests/file/007_variation1.phpt b/ext/standard/tests/file/007_variation1.phpt new file mode 100644 index 0000000..6cba146 --- /dev/null +++ b/ext/standard/tests/file/007_variation1.phpt @@ -0,0 +1,54 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(0) +bool(true) +string(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation10.phpt b/ext/standard/tests/file/007_variation10.phpt new file mode 100644 index 0000000..c9f3e01 --- /dev/null +++ b/ext/standard/tests/file/007_variation10.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r+t" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r+t' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) +int(37) +int(57) +bool(true) +string(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation11-win32.phpt b/ext/standard/tests/file/007_variation11-win32.phpt new file mode 100644 index 0000000..d9c6e83 --- /dev/null +++ b/ext/standard/tests/file/007_variation11-win32.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "wt" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'wt' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(39) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation11.phpt b/ext/standard/tests/file/007_variation11.phpt new file mode 100644 index 0000000..0656c64 --- /dev/null +++ b/ext/standard/tests/file/007_variation11.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "wt" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'wt' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation12-win32.phpt b/ext/standard/tests/file/007_variation12-win32.phpt new file mode 100644 index 0000000..0fb9ad8 --- /dev/null +++ b/ext/standard/tests/file/007_variation12-win32.phpt @@ -0,0 +1,78 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+t" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+t' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(39) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation12.phpt b/ext/standard/tests/file/007_variation12.phpt new file mode 100644 index 0000000..44488fa --- /dev/null +++ b/ext/standard/tests/file/007_variation12.phpt @@ -0,0 +1,78 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+t" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+t' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation13-win32.phpt b/ext/standard/tests/file/007_variation13-win32.phpt new file mode 100644 index 0000000..736b101 --- /dev/null +++ b/ext/standard/tests/file/007_variation13-win32.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "at" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'at' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(59) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation13.phpt b/ext/standard/tests/file/007_variation13.phpt new file mode 100644 index 0000000..0cb48d3 --- /dev/null +++ b/ext/standard/tests/file/007_variation13.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "at" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'at' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(57) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation14.phpt b/ext/standard/tests/file/007_variation14.phpt new file mode 100644 index 0000000..ed76ab4 --- /dev/null +++ b/ext/standard/tests/file/007_variation14.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a+t" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a+t' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +string(7) "Unknown" +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation15.phpt b/ext/standard/tests/file/007_variation15.phpt new file mode 100644 index 0000000..11eed0d --- /dev/null +++ b/ext/standard/tests/file/007_variation15.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "xt" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'xt' mode *** +resource(%d) of type (stream) +%unicode|string%(6) "stream" +int(0) +int(37) +int(37) +string(0) "" +int(0) +bool(true) +%unicode|string%(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %s +*** Done *** diff --git a/ext/standard/tests/file/007_variation16.phpt b/ext/standard/tests/file/007_variation16.phpt new file mode 100644 index 0000000..c725aa1 --- /dev/null +++ b/ext/standard/tests/file/007_variation16.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x+t" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x+t' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation17.phpt b/ext/standard/tests/file/007_variation17.phpt new file mode 100644 index 0000000..d3408e9 --- /dev/null +++ b/ext/standard/tests/file/007_variation17.phpt @@ -0,0 +1,54 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "rb" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'rb' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(0) +bool(true) +string(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation18.phpt b/ext/standard/tests/file/007_variation18.phpt new file mode 100644 index 0000000..991051d --- /dev/null +++ b/ext/standard/tests/file/007_variation18.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r+b' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) +int(37) +int(57) +bool(true) +string(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation19.phpt b/ext/standard/tests/file/007_variation19.phpt new file mode 100644 index 0000000..3830e4f --- /dev/null +++ b/ext/standard/tests/file/007_variation19.phpt @@ -0,0 +1,71 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "wb" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'wb' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation2.phpt b/ext/standard/tests/file/007_variation2.phpt new file mode 100644 index 0000000..4c883ea --- /dev/null +++ b/ext/standard/tests/file/007_variation2.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r+' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) +int(37) +int(57) +bool(true) +string(7) "Unknown" +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/file/007_variation20.phpt b/ext/standard/tests/file/007_variation20.phpt new file mode 100644 index 0000000..4d66dc7 --- /dev/null +++ b/ext/standard/tests/file/007_variation20.phpt @@ -0,0 +1,73 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+b' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation21.phpt b/ext/standard/tests/file/007_variation21.phpt new file mode 100644 index 0000000..6c968f2 --- /dev/null +++ b/ext/standard/tests/file/007_variation21.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "ab" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'ab' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(57) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation22.phpt b/ext/standard/tests/file/007_variation22.phpt new file mode 100644 index 0000000..d1456fe --- /dev/null +++ b/ext/standard/tests/file/007_variation22.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a+b' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +string(7) "Unknown" +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation23.phpt b/ext/standard/tests/file/007_variation23.phpt new file mode 100644 index 0000000..528f05a --- /dev/null +++ b/ext/standard/tests/file/007_variation23.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "xb" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'xb' mode *** +resource(%d) of type (stream) +%unicode|string%(6) "stream" +int(0) +int(37) +int(37) +string(0) "" +int(0) +bool(true) +%unicode|string%(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %s +*** Done *** diff --git a/ext/standard/tests/file/007_variation24.phpt b/ext/standard/tests/file/007_variation24.phpt new file mode 100644 index 0000000..41fc24c --- /dev/null +++ b/ext/standard/tests/file/007_variation24.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x+b' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation3.phpt b/ext/standard/tests/file/007_variation3.phpt new file mode 100644 index 0000000..cd31eba --- /dev/null +++ b/ext/standard/tests/file/007_variation3.phpt @@ -0,0 +1,71 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation4.phpt b/ext/standard/tests/file/007_variation4.phpt new file mode 100644 index 0000000..e88324e --- /dev/null +++ b/ext/standard/tests/file/007_variation4.phpt @@ -0,0 +1,73 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/file/007_variation5.phpt b/ext/standard/tests/file/007_variation5.phpt new file mode 100644 index 0000000..9311534 --- /dev/null +++ b/ext/standard/tests/file/007_variation5.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(37) +string(0) "" +int(0) +bool(true) +string(7) "Unknown" +int(57) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation6.phpt b/ext/standard/tests/file/007_variation6.phpt new file mode 100644 index 0000000..b274b05 --- /dev/null +++ b/ext/standard/tests/file/007_variation6.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a+' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +string(7) "Unknown" +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation7.phpt b/ext/standard/tests/file/007_variation7.phpt new file mode 100644 index 0000000..131daff --- /dev/null +++ b/ext/standard/tests/file/007_variation7.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x' mode *** +resource(%d) of type (stream) +%unicode|string%(6) "stream" +int(0) +int(37) +int(37) +string(0) "" +int(0) +bool(true) +%unicode|string%(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %s +*** Done *** diff --git a/ext/standard/tests/file/007_variation8.phpt b/ext/standard/tests/file/007_variation8.phpt new file mode 100644 index 0000000..aa84711 --- /dev/null +++ b/ext/standard/tests/file/007_variation8.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x+' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation9.phpt b/ext/standard/tests/file/007_variation9.phpt new file mode 100644 index 0000000..ab5f1ca --- /dev/null +++ b/ext/standard/tests/file/007_variation9.phpt @@ -0,0 +1,54 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "rt" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'rt' mode *** +resource(%d) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(0) +bool(true) +string(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/basename-win32.phpt b/ext/standard/tests/file/basename-win32.phpt new file mode 100644 index 0000000..5fd0f96 --- /dev/null +++ b/ext/standard/tests/file/basename-win32.phpt @@ -0,0 +1,341 @@ +--TEST-- +basename +--CREDITS-- +Dave Kelsey +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing basic operations *** + +--Iteration 1-- +string(3) "bar" + +--Iteration 2-- +string(3) "bar" + +--Iteration 3-- +string(3) "bar" + +--Iteration 4-- +string(3) "bar" + +--Iteration 5-- +string(3) "bar" + +--Iteration 6-- +string(3) "bar" + +--Iteration 7-- +string(3) "bar" + +--Iteration 8-- +string(3) "bar" + +--Iteration 9-- +string(3) "bar" + +--Iteration 10-- +string(3) "bar" + +--Iteration 11-- +string(7) "bar.zip" + +--Iteration 12-- +string(3) "bar" + +--Iteration 13-- +string(3) "bar" + +--Iteration 14-- +string(3) "bar" + +--Iteration 15-- +string(3) "bar" + +--Iteration 16-- +string(3) "bar" + +--Iteration 17-- +string(3) "bar" + +--Iteration 18-- +string(3) "bar" + +--Iteration 19-- +string(3) "bar" + +--Iteration 20-- +string(4) ".zip" + +--Iteration 21-- +string(4) ".zip" + +--Iteration 22-- +string(4) ".zip" + +--Iteration 23-- +string(4) ".zip" + +--Iteration 24-- +string(4) ".zip" + +--Iteration 25-- +string(4) ".zip" + +*** Testing possible variations in path and suffix *** + +--Iteration 1-- +string(3) "bar" + +--Iteration 2-- +string(3) "bar" + +--Iteration 3-- +string(3) "bar" + +--Iteration 4-- +string(3) "bar" + +--Iteration 5-- +string(3) "bar" + +--Iteration 6-- +string(7) "bar.tar" + +--Iteration 7-- +string(7) "bar.tar" + +--Iteration 8-- +string(7) "bar.tar" + +--Iteration 9-- +string(7) "bar.tar" + +--Iteration 10-- +string(7) "bar.tar" + +--Iteration 11-- +string(7) "bar.tar" + +--Iteration 12-- +string(4) "10.5" + +--Iteration 13-- +string(2) "10" + +--Iteration 14-- +string(4) "10.5" + +--Iteration 15-- +string(2) "10" + +--Iteration 16-- +string(2) "10" + +--Iteration 17-- +string(4) "10.5" + +--Iteration 18-- +string(4) "10.5" + +--Iteration 19-- +string(6) "10.zip" + +--Iteration 20-- +string(1) "0" + +--Iteration 21-- +string(1) "0" + +--Iteration 22-- +string(7) "bar.zip" + +--Iteration 23-- +string(7) "bar.zip" + +--Iteration 24-- +string(7) "bar.zip" + +--Iteration 25-- +string(1) " " + +--Iteration 26-- +string(1) " " + +--Iteration 27-- +string(0) "" + +--Iteration 28-- +string(1) " " + +--Iteration 29-- +string(1) " " + +--Iteration 30-- +string(0) "" + +--Iteration 31-- +string(0) "" + +--Iteration 32-- +string(0) "" + +*** Testing error conditions *** + +Warning: basename() expects at least 1 parameter, 0 given in %s on line %d +NULL + +Warning: basename() expects at most 2 parameters, 3 given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string, array given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string, array given in %s on line %d +NULL + +Warning: basename() expects parameter 2 to be string, array given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string, object given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string, object given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string, object given in %s on line %d +NULL + +Warning: basename() expects parameter 2 to be string, object given in %s on line %d +NULL +Done diff --git a/ext/standard/tests/file/basename.phpt b/ext/standard/tests/file/basename.phpt new file mode 100644 index 0000000..c0e7498 Binary files /dev/null and b/ext/standard/tests/file/basename.phpt differ diff --git a/ext/standard/tests/file/basename_basic-win32.phpt b/ext/standard/tests/file/basename_basic-win32.phpt new file mode 100644 index 0000000..f575c5a --- /dev/null +++ b/ext/standard/tests/file/basename_basic-win32.phpt @@ -0,0 +1,101 @@ +--TEST-- +basename() basic functionality +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(4) "10.5" +string(4) "10.5" +string(4) "10.5" +string(3) "105" +string(4) "10.5" +string(4) "10.5" +string(4) "10.5" +string(4) "10.5" +string(6) "10.zip" +string(1) "0" +string(1) "0" +string(1) " " +string(1) " " +string(0) "" +string(0) "" +string(0) "" diff --git a/ext/standard/tests/file/basename_basic.phpt b/ext/standard/tests/file/basename_basic.phpt new file mode 100644 index 0000000..68aefb2 --- /dev/null +++ b/ext/standard/tests/file/basename_basic.phpt @@ -0,0 +1,101 @@ +--TEST-- +basename() basic functionality +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(8) "\foo\bar" +string(7) "foo\bar" +string(4) "\bar" +string(4) "bar\" +string(5) "\bar\" +string(9) "\foo\bar\" +string(8) "foo\bar\" +string(5) "\bar\" +string(9) "10.5\10.5" +string(4) "10.5" +string(4) "10.5" +string(3) "105" +string(4) "10.5" +string(5) "\10.5" +string(4) "10.5" +string(5) "10.5\" +string(6) "10.zip" +string(1) "0" +string(1) "0" +string(1) " " +string(1) " " +string(0) "" +string(0) "" +string(0) "" diff --git a/ext/standard/tests/file/basename_error.phpt b/ext/standard/tests/file/basename_error.phpt new file mode 100644 index 0000000..53c53cf --- /dev/null +++ b/ext/standard/tests/file/basename_error.phpt @@ -0,0 +1,38 @@ +--TEST-- +Test basename() function : error conditions +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing basename() : error conditions *** + +-- Testing basename() function with Zero arguments -- + +Warning: basename() expects at least 1 parameter, 0 given in %s on line %d +NULL + +-- Testing basename() function with more than expected no. of arguments -- + +Warning: basename() expects at most 2 parameters, 3 given in %s on line %d +NULL +===DONE=== diff --git a/ext/standard/tests/file/basename_variation1-win32.phpt b/ext/standard/tests/file/basename_variation1-win32.phpt new file mode 100644 index 0000000..0f4293e --- /dev/null +++ b/ext/standard/tests/file/basename_variation1-win32.phpt @@ -0,0 +1,238 @@ +--TEST-- +basename() with various inputs +--SKIPIF-- + +--FILE-- + +--EXPECT-- +basename for path A:/foo is: +string(3) "foo" +basename for path A:/foo/ is: +string(3) "foo" +basename for path A:/foo\ is: +string(3) "foo" +basename for path A:/foo.bar is: +string(7) "foo.bar" +basename for path A:/foo.bar/ is: +string(7) "foo.bar" +basename for path A:/foo.bar\ is: +string(7) "foo.bar" +basename for path A:/dir/foo.bar is: +string(7) "foo.bar" +basename for path A:/dir\foo.bar is: +string(7) "foo.bar" +basename for path A:/dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path A:/dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path Z:/foo is: +string(3) "foo" +basename for path Z:/foo/ is: +string(3) "foo" +basename for path Z:/foo\ is: +string(3) "foo" +basename for path Z:/foo.bar is: +string(7) "foo.bar" +basename for path Z:/foo.bar/ is: +string(7) "foo.bar" +basename for path Z:/foo.bar\ is: +string(7) "foo.bar" +basename for path Z:/dir/foo.bar is: +string(7) "foo.bar" +basename for path Z:/dir\foo.bar is: +string(7) "foo.bar" +basename for path Z:/dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path Z:/dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path A:\foo is: +string(3) "foo" +basename for path A:\foo/ is: +string(3) "foo" +basename for path A:\foo\ is: +string(3) "foo" +basename for path A:\foo.bar is: +string(7) "foo.bar" +basename for path A:\foo.bar/ is: +string(7) "foo.bar" +basename for path A:\foo.bar\ is: +string(7) "foo.bar" +basename for path A:\dir/foo.bar is: +string(7) "foo.bar" +basename for path A:\dir\foo.bar is: +string(7) "foo.bar" +basename for path A:\dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path A:\dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path http://foo is: +string(3) "foo" +basename for path http://foo/ is: +string(3) "foo" +basename for path http://foo\ is: +string(3) "foo" +basename for path http://foo.bar is: +string(7) "foo.bar" +basename for path http://foo.bar/ is: +string(7) "foo.bar" +basename for path http://foo.bar\ is: +string(7) "foo.bar" +basename for path http://dir/foo.bar is: +string(7) "foo.bar" +basename for path http://dir\foo.bar is: +string(7) "foo.bar" +basename for path http://dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path http://dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path blah://foo is: +string(3) "foo" +basename for path blah://foo/ is: +string(3) "foo" +basename for path blah://foo\ is: +string(3) "foo" +basename for path blah://foo.bar is: +string(7) "foo.bar" +basename for path blah://foo.bar/ is: +string(7) "foo.bar" +basename for path blah://foo.bar\ is: +string(7) "foo.bar" +basename for path blah://dir/foo.bar is: +string(7) "foo.bar" +basename for path blah://dir\foo.bar is: +string(7) "foo.bar" +basename for path blah://dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path blah://dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path blah:\foo is: +string(3) "foo" +basename for path blah:\foo/ is: +string(3) "foo" +basename for path blah:\foo\ is: +string(3) "foo" +basename for path blah:\foo.bar is: +string(7) "foo.bar" +basename for path blah:\foo.bar/ is: +string(7) "foo.bar" +basename for path blah:\foo.bar\ is: +string(7) "foo.bar" +basename for path blah:\dir/foo.bar is: +string(7) "foo.bar" +basename for path blah:\dir\foo.bar is: +string(7) "foo.bar" +basename for path blah:\dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path blah:\dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path hostname:foo is: +string(12) "hostname:foo" +basename for path hostname:foo/ is: +string(12) "hostname:foo" +basename for path hostname:foo\ is: +string(12) "hostname:foo" +basename for path hostname:foo.bar is: +string(16) "hostname:foo.bar" +basename for path hostname:foo.bar/ is: +string(16) "hostname:foo.bar" +basename for path hostname:foo.bar\ is: +string(16) "hostname:foo.bar" +basename for path hostname:dir/foo.bar is: +string(7) "foo.bar" +basename for path hostname:dir\foo.bar is: +string(7) "foo.bar" +basename for path hostname:dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path hostname:dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path ~/foo is: +string(3) "foo" +basename for path ~/foo/ is: +string(3) "foo" +basename for path ~/foo\ is: +string(3) "foo" +basename for path ~/foo.bar is: +string(7) "foo.bar" +basename for path ~/foo.bar/ is: +string(7) "foo.bar" +basename for path ~/foo.bar\ is: +string(7) "foo.bar" +basename for path ~/dir/foo.bar is: +string(7) "foo.bar" +basename for path ~/dir\foo.bar is: +string(7) "foo.bar" +basename for path ~/dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path ~/dir with spaces\foo.bar is: +string(7) "foo.bar" +basename for path ~\foo is: +string(3) "foo" +basename for path ~\foo/ is: +string(3) "foo" +basename for path ~\foo\ is: +string(3) "foo" +basename for path ~\foo.bar is: +string(7) "foo.bar" +basename for path ~\foo.bar/ is: +string(7) "foo.bar" +basename for path ~\foo.bar\ is: +string(7) "foo.bar" +basename for path ~\dir/foo.bar is: +string(7) "foo.bar" +basename for path ~\dir\foo.bar is: +string(7) "foo.bar" +basename for path ~\dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path ~\dir with spaces\foo.bar is: +string(7) "foo.bar" + +done diff --git a/ext/standard/tests/file/basename_variation1.phpt b/ext/standard/tests/file/basename_variation1.phpt new file mode 100644 index 0000000..9358238 --- /dev/null +++ b/ext/standard/tests/file/basename_variation1.phpt @@ -0,0 +1,238 @@ +--TEST-- +basename() with various inputs +--SKIPIF-- + +--FILE-- + +--EXPECT-- +basename for path A:/foo is: +string(3) "foo" +basename for path A:/foo/ is: +string(3) "foo" +basename for path A:/foo\ is: +string(4) "foo\" +basename for path A:/foo.bar is: +string(7) "foo.bar" +basename for path A:/foo.bar/ is: +string(7) "foo.bar" +basename for path A:/foo.bar\ is: +string(8) "foo.bar\" +basename for path A:/dir/foo.bar is: +string(7) "foo.bar" +basename for path A:/dir\foo.bar is: +string(11) "dir\foo.bar" +basename for path A:/dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path A:/dir with spaces\foo.bar is: +string(23) "dir with spaces\foo.bar" +basename for path Z:/foo is: +string(3) "foo" +basename for path Z:/foo/ is: +string(3) "foo" +basename for path Z:/foo\ is: +string(4) "foo\" +basename for path Z:/foo.bar is: +string(7) "foo.bar" +basename for path Z:/foo.bar/ is: +string(7) "foo.bar" +basename for path Z:/foo.bar\ is: +string(8) "foo.bar\" +basename for path Z:/dir/foo.bar is: +string(7) "foo.bar" +basename for path Z:/dir\foo.bar is: +string(11) "dir\foo.bar" +basename for path Z:/dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path Z:/dir with spaces\foo.bar is: +string(23) "dir with spaces\foo.bar" +basename for path A:\foo is: +string(6) "A:\foo" +basename for path A:\foo/ is: +string(6) "A:\foo" +basename for path A:\foo\ is: +string(7) "A:\foo\" +basename for path A:\foo.bar is: +string(10) "A:\foo.bar" +basename for path A:\foo.bar/ is: +string(10) "A:\foo.bar" +basename for path A:\foo.bar\ is: +string(11) "A:\foo.bar\" +basename for path A:\dir/foo.bar is: +string(7) "foo.bar" +basename for path A:\dir\foo.bar is: +string(14) "A:\dir\foo.bar" +basename for path A:\dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path A:\dir with spaces\foo.bar is: +string(26) "A:\dir with spaces\foo.bar" +basename for path http://foo is: +string(3) "foo" +basename for path http://foo/ is: +string(3) "foo" +basename for path http://foo\ is: +string(4) "foo\" +basename for path http://foo.bar is: +string(7) "foo.bar" +basename for path http://foo.bar/ is: +string(7) "foo.bar" +basename for path http://foo.bar\ is: +string(8) "foo.bar\" +basename for path http://dir/foo.bar is: +string(7) "foo.bar" +basename for path http://dir\foo.bar is: +string(11) "dir\foo.bar" +basename for path http://dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path http://dir with spaces\foo.bar is: +string(23) "dir with spaces\foo.bar" +basename for path blah://foo is: +string(3) "foo" +basename for path blah://foo/ is: +string(3) "foo" +basename for path blah://foo\ is: +string(4) "foo\" +basename for path blah://foo.bar is: +string(7) "foo.bar" +basename for path blah://foo.bar/ is: +string(7) "foo.bar" +basename for path blah://foo.bar\ is: +string(8) "foo.bar\" +basename for path blah://dir/foo.bar is: +string(7) "foo.bar" +basename for path blah://dir\foo.bar is: +string(11) "dir\foo.bar" +basename for path blah://dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path blah://dir with spaces\foo.bar is: +string(23) "dir with spaces\foo.bar" +basename for path blah:\foo is: +string(9) "blah:\foo" +basename for path blah:\foo/ is: +string(9) "blah:\foo" +basename for path blah:\foo\ is: +string(10) "blah:\foo\" +basename for path blah:\foo.bar is: +string(13) "blah:\foo.bar" +basename for path blah:\foo.bar/ is: +string(13) "blah:\foo.bar" +basename for path blah:\foo.bar\ is: +string(14) "blah:\foo.bar\" +basename for path blah:\dir/foo.bar is: +string(7) "foo.bar" +basename for path blah:\dir\foo.bar is: +string(17) "blah:\dir\foo.bar" +basename for path blah:\dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path blah:\dir with spaces\foo.bar is: +string(29) "blah:\dir with spaces\foo.bar" +basename for path hostname:foo is: +string(12) "hostname:foo" +basename for path hostname:foo/ is: +string(12) "hostname:foo" +basename for path hostname:foo\ is: +string(13) "hostname:foo\" +basename for path hostname:foo.bar is: +string(16) "hostname:foo.bar" +basename for path hostname:foo.bar/ is: +string(16) "hostname:foo.bar" +basename for path hostname:foo.bar\ is: +string(17) "hostname:foo.bar\" +basename for path hostname:dir/foo.bar is: +string(7) "foo.bar" +basename for path hostname:dir\foo.bar is: +string(20) "hostname:dir\foo.bar" +basename for path hostname:dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path hostname:dir with spaces\foo.bar is: +string(32) "hostname:dir with spaces\foo.bar" +basename for path ~/foo is: +string(3) "foo" +basename for path ~/foo/ is: +string(3) "foo" +basename for path ~/foo\ is: +string(4) "foo\" +basename for path ~/foo.bar is: +string(7) "foo.bar" +basename for path ~/foo.bar/ is: +string(7) "foo.bar" +basename for path ~/foo.bar\ is: +string(8) "foo.bar\" +basename for path ~/dir/foo.bar is: +string(7) "foo.bar" +basename for path ~/dir\foo.bar is: +string(11) "dir\foo.bar" +basename for path ~/dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path ~/dir with spaces\foo.bar is: +string(23) "dir with spaces\foo.bar" +basename for path ~\foo is: +string(5) "~\foo" +basename for path ~\foo/ is: +string(5) "~\foo" +basename for path ~\foo\ is: +string(6) "~\foo\" +basename for path ~\foo.bar is: +string(9) "~\foo.bar" +basename for path ~\foo.bar/ is: +string(9) "~\foo.bar" +basename for path ~\foo.bar\ is: +string(10) "~\foo.bar\" +basename for path ~\dir/foo.bar is: +string(7) "foo.bar" +basename for path ~\dir\foo.bar is: +string(13) "~\dir\foo.bar" +basename for path ~\dir with spaces/foo.bar is: +string(7) "foo.bar" +basename for path ~\dir with spaces\foo.bar is: +string(25) "~\dir with spaces\foo.bar" + +done diff --git a/ext/standard/tests/file/basename_variation2-win32.phpt b/ext/standard/tests/file/basename_variation2-win32.phpt new file mode 100644 index 0000000..5e9961b --- /dev/null +++ b/ext/standard/tests/file/basename_variation2-win32.phpt @@ -0,0 +1,253 @@ +--TEST-- +Testing basename() with various values for the suffix parameter +--SKIPIF-- + +--FILE-- + +--EXPECT-- +basename for path foo, supplying suffix .bar is: +string(3) "foo" +basename for path foo, supplying suffix .b is: +string(3) "foo" +basename for path foo, supplying suffix . is: +string(3) "foo" +basename for path foo, supplying suffix is: +string(3) "foo" +basename for path foo, supplying suffix foo is: +string(3) "foo" +basename for path foo, supplying suffix foo.bar is: +string(3) "foo" +basename for path foo, supplying suffix foo/bar is: +string(3) "foo" +basename for path foo, supplying suffix foo\bar is: +string(3) "foo" +basename for path foo, supplying suffix / is: +string(3) "foo" +basename for path foo, supplying suffix \ is: +string(3) "foo" +basename for path foo/, supplying suffix .bar is: +string(3) "foo" +basename for path foo/, supplying suffix .b is: +string(3) "foo" +basename for path foo/, supplying suffix . is: +string(3) "foo" +basename for path foo/, supplying suffix is: +string(3) "foo" +basename for path foo/, supplying suffix foo is: +string(3) "foo" +basename for path foo/, supplying suffix foo.bar is: +string(3) "foo" +basename for path foo/, supplying suffix foo/bar is: +string(3) "foo" +basename for path foo/, supplying suffix foo\bar is: +string(3) "foo" +basename for path foo/, supplying suffix / is: +string(3) "foo" +basename for path foo/, supplying suffix \ is: +string(3) "foo" +basename for path foo\, supplying suffix .bar is: +string(3) "foo" +basename for path foo\, supplying suffix .b is: +string(3) "foo" +basename for path foo\, supplying suffix . is: +string(3) "foo" +basename for path foo\, supplying suffix is: +string(3) "foo" +basename for path foo\, supplying suffix foo is: +string(3) "foo" +basename for path foo\, supplying suffix foo.bar is: +string(3) "foo" +basename for path foo\, supplying suffix foo/bar is: +string(3) "foo" +basename for path foo\, supplying suffix foo\bar is: +string(3) "foo" +basename for path foo\, supplying suffix / is: +string(3) "foo" +basename for path foo\, supplying suffix \ is: +string(3) "foo" +basename for path foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix \ is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix .bar is: +string(3) "foo" +basename for path foo.bar/, supplying suffix .b is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix . is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix / is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix \ is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix .bar is: +string(3) "foo" +basename for path foo.bar\, supplying suffix .b is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix . is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix foo is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix / is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix \ is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path dir/foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix \ is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path dir\foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix \ is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path dir with spaces/foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix \ is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path dir with spaces\foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix \ is: +string(7) "foo.bar" + +done diff --git a/ext/standard/tests/file/basename_variation2.phpt b/ext/standard/tests/file/basename_variation2.phpt new file mode 100644 index 0000000..96cfd65 --- /dev/null +++ b/ext/standard/tests/file/basename_variation2.phpt @@ -0,0 +1,253 @@ +--TEST-- +Testing basename() with various values for the suffix parameter +--SKIPIF-- + +--FILE-- + +--EXPECT-- +basename for path foo, supplying suffix .bar is: +string(3) "foo" +basename for path foo, supplying suffix .b is: +string(3) "foo" +basename for path foo, supplying suffix . is: +string(3) "foo" +basename for path foo, supplying suffix is: +string(3) "foo" +basename for path foo, supplying suffix foo is: +string(3) "foo" +basename for path foo, supplying suffix foo.bar is: +string(3) "foo" +basename for path foo, supplying suffix foo/bar is: +string(3) "foo" +basename for path foo, supplying suffix foo\bar is: +string(3) "foo" +basename for path foo, supplying suffix / is: +string(3) "foo" +basename for path foo, supplying suffix \ is: +string(3) "foo" +basename for path foo/, supplying suffix .bar is: +string(3) "foo" +basename for path foo/, supplying suffix .b is: +string(3) "foo" +basename for path foo/, supplying suffix . is: +string(3) "foo" +basename for path foo/, supplying suffix is: +string(3) "foo" +basename for path foo/, supplying suffix foo is: +string(3) "foo" +basename for path foo/, supplying suffix foo.bar is: +string(3) "foo" +basename for path foo/, supplying suffix foo/bar is: +string(3) "foo" +basename for path foo/, supplying suffix foo\bar is: +string(3) "foo" +basename for path foo/, supplying suffix / is: +string(3) "foo" +basename for path foo/, supplying suffix \ is: +string(3) "foo" +basename for path foo\, supplying suffix .bar is: +string(4) "foo\" +basename for path foo\, supplying suffix .b is: +string(4) "foo\" +basename for path foo\, supplying suffix . is: +string(4) "foo\" +basename for path foo\, supplying suffix is: +string(4) "foo\" +basename for path foo\, supplying suffix foo is: +string(4) "foo\" +basename for path foo\, supplying suffix foo.bar is: +string(4) "foo\" +basename for path foo\, supplying suffix foo/bar is: +string(4) "foo\" +basename for path foo\, supplying suffix foo\bar is: +string(4) "foo\" +basename for path foo\, supplying suffix / is: +string(4) "foo\" +basename for path foo\, supplying suffix \ is: +string(3) "foo" +basename for path foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path foo.bar, supplying suffix \ is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix .bar is: +string(3) "foo" +basename for path foo.bar/, supplying suffix .b is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix . is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix / is: +string(7) "foo.bar" +basename for path foo.bar/, supplying suffix \ is: +string(7) "foo.bar" +basename for path foo.bar\, supplying suffix .bar is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix .b is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix . is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix foo is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix foo.bar is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix foo/bar is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix foo\bar is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix / is: +string(8) "foo.bar\" +basename for path foo.bar\, supplying suffix \ is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path dir/foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path dir/foo.bar, supplying suffix \ is: +string(7) "foo.bar" +basename for path dir\foo.bar, supplying suffix .bar is: +string(7) "dir\foo" +basename for path dir\foo.bar, supplying suffix .b is: +string(11) "dir\foo.bar" +basename for path dir\foo.bar, supplying suffix . is: +string(11) "dir\foo.bar" +basename for path dir\foo.bar, supplying suffix is: +string(11) "dir\foo.bar" +basename for path dir\foo.bar, supplying suffix foo is: +string(11) "dir\foo.bar" +basename for path dir\foo.bar, supplying suffix foo.bar is: +string(4) "dir\" +basename for path dir\foo.bar, supplying suffix foo/bar is: +string(11) "dir\foo.bar" +basename for path dir\foo.bar, supplying suffix foo\bar is: +string(11) "dir\foo.bar" +basename for path dir\foo.bar, supplying suffix / is: +string(11) "dir\foo.bar" +basename for path dir\foo.bar, supplying suffix \ is: +string(11) "dir\foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix .bar is: +string(3) "foo" +basename for path dir with spaces/foo.bar, supplying suffix .b is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix . is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo.bar is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo/bar is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix foo\bar is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix / is: +string(7) "foo.bar" +basename for path dir with spaces/foo.bar, supplying suffix \ is: +string(7) "foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix .bar is: +string(19) "dir with spaces\foo" +basename for path dir with spaces\foo.bar, supplying suffix .b is: +string(23) "dir with spaces\foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix . is: +string(23) "dir with spaces\foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix is: +string(23) "dir with spaces\foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix foo is: +string(23) "dir with spaces\foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix foo.bar is: +string(16) "dir with spaces\" +basename for path dir with spaces\foo.bar, supplying suffix foo/bar is: +string(23) "dir with spaces\foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix foo\bar is: +string(23) "dir with spaces\foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix / is: +string(23) "dir with spaces\foo.bar" +basename for path dir with spaces\foo.bar, supplying suffix \ is: +string(23) "dir with spaces\foo.bar" + +done diff --git a/ext/standard/tests/file/basename_variation3.phpt b/ext/standard/tests/file/basename_variation3.phpt new file mode 100644 index 0000000..f01f550 --- /dev/null +++ b/ext/standard/tests/file/basename_variation3.phpt @@ -0,0 +1,185 @@ +--TEST-- +Test basename() function : first parameter type variations +--FILE-- + 1, 'two' => 2); + +//array of values to iterate over +$inputs = array( + + // int data + 'int 0' => 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + + // float data + 'float 10.5' => 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + + // array data + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + + // null data + 'uppercase NULL' => NULL, + 'lowercase null' => null, + + // boolean data + 'lowercase true' => true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + + // empty data + 'empty string DQ' => "", + 'empty string SQ' => '', + + // object data + 'instance of classWithToString' => new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + + // undefined data + 'undefined var' => @$undefined_var, + + // unset data + 'unset var' => @$unset_var, +); + +// loop through each element of the array for path + +foreach($inputs as $key =>$value) { + echo "\n--$key--\n"; + var_dump( basename($value) ); +}; + +?> +===DONE=== +--EXPECTF-- +*** Testing basename() : usage variation *** + +--int 0-- +string(1) "0" + +--int 1-- +string(1) "1" + +--int 12345-- +string(5) "12345" + +--int -12345-- +string(5) "-2345" + +--float 10.5-- +string(4) "10.5" + +--float -10.5-- +string(5) "-10.5" + +--float 12.3456789000e10-- +string(12) "123456789000" + +--float -12.3456789000e10-- +string(13) "-123456789000" + +--float .5-- +string(3) "0.5" + +--empty array-- +Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) +NULL + +--int indexed array-- +Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) +NULL + +--associative array-- +Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) +NULL + +--nested arrays-- +Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) +NULL + +--uppercase NULL-- +string(0) "" + +--lowercase null-- +string(0) "" + +--lowercase true-- +string(1) "1" + +--lowercase false-- +string(0) "" + +--uppercase TRUE-- +string(1) "1" + +--uppercase FALSE-- +string(0) "" + +--empty string DQ-- +string(0) "" + +--empty string SQ-- +string(0) "" + +--instance of classWithToString-- +string(14) "Class A object" + +--instance of classWithoutToString-- +Error: 2 - basename() expects parameter 1 to be string, object given, %s(%d) +NULL + +--undefined var-- +string(0) "" + +--unset var-- +string(0) "" +===DONE=== diff --git a/ext/standard/tests/file/basename_variation4.phpt b/ext/standard/tests/file/basename_variation4.phpt new file mode 100644 index 0000000..88ce61a --- /dev/null +++ b/ext/standard/tests/file/basename_variation4.phpt @@ -0,0 +1,188 @@ +--TEST-- +Test basename() function : second parameter type variation +--FILE-- + 1, 'two' => 2); + +//array of values to iterate over +$inputs = array( + + // int data + 'int 0' => 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + + // float data + 'float 10.5' => 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + + // array data + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + + // null data + 'uppercase NULL' => NULL, + 'lowercase null' => null, + + // boolean data + 'lowercase true' => true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + + // empty data + 'empty string DQ' => "", + 'empty string SQ' => '', + + // object data + 'instance of classWithToString' => new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + + // undefined data + 'undefined var' => @$undefined_var, + + // unset data + 'unset var' => @$unset_var, +); + +// loop through each element of the array for suffix + +foreach($inputs as $key =>$value) { + echo "\n--$key--\n"; + var_dump( basename($path, $value) ); +}; + +?> +===DONE=== +--EXPECTF-- +*** Testing basename() : usage variation *** + +--int 0-- +string(4) "path" + +--int 1-- +string(4) "path" + +--int 12345-- +string(4) "path" + +--int -12345-- +string(4) "path" + +--float 10.5-- +string(4) "path" + +--float -10.5-- +string(4) "path" + +--float 12.3456789000e10-- +string(4) "path" + +--float -12.3456789000e10-- +string(4) "path" + +--float .5-- +string(4) "path" + +--empty array-- +Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) +NULL + +--int indexed array-- +Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) +NULL + +--associative array-- +Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) +NULL + +--nested arrays-- +Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) +NULL + +--uppercase NULL-- +string(4) "path" + +--lowercase null-- +string(4) "path" + +--lowercase true-- +string(4) "path" + +--lowercase false-- +string(4) "path" + +--uppercase TRUE-- +string(4) "path" + +--uppercase FALSE-- +string(4) "path" + +--empty string DQ-- +string(4) "path" + +--empty string SQ-- +string(4) "path" + +--instance of classWithToString-- +string(4) "path" + +--instance of classWithoutToString-- +Error: 2 - basename() expects parameter 2 to be string, object given, %s(%d) +NULL + +--undefined var-- +string(4) "path" + +--unset var-- +string(4) "path" +===DONE=== diff --git a/ext/standard/tests/file/bug12556.phpt b/ext/standard/tests/file/bug12556.phpt new file mode 100644 index 0000000..c8e35cf --- /dev/null +++ b/ext/standard/tests/file/bug12556.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #12556 (fgetcsv() ignores lengths when quotes not closed) +--FILE-- + +--EXPECT-- +array(4) { + [0]=> + string(1) "6" + [1]=> + string(1) "7" + [2]=> + string(1) "8" + [3]=> + string(5) "line1" +} +array(4) { + [0]=> + string(1) "1" + [1]=> + string(1) "2" + [2]=> + string(1) "3" + [3]=> + string(186) "line2 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +2,4,5,line3 +" +} diff --git a/ext/standard/tests/file/bug20424.phpt b/ext/standard/tests/file/bug20424.phpt new file mode 100644 index 0000000..b8f9dfd --- /dev/null +++ b/ext/standard/tests/file/bug20424.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #20424 (stream_get_meta_data crashes on a normal file stream) +--FILE-- + +--EXPECT-- +I'm alive! diff --git a/ext/standard/tests/file/bug22382.phpt b/ext/standard/tests/file/bug22382.phpt new file mode 100644 index 0000000..2ba36ee --- /dev/null +++ b/ext/standard/tests/file/bug22382.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #22382 (fgetcsv() does not handle escaped quotes correctly) +--FILE-- + +--EXPECT-- +array(6) { + [0]=> + string(3) "One" + [1]=> + string(7) "\"Two\"" + [2]=> + string(7) "Three\"" + [3]=> + string(4) "Four" + [4]=> + string(2) "\\" + [5]=> + string(28) "\\\\\\\\\\\\\\\\\\\\\\\"\\\\" +} diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt new file mode 100644 index 0000000..9538c8e --- /dev/null +++ b/ext/standard/tests/file/bug22414.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #22414 (passthru() does not read data correctly) +--INI-- +output_handler= +--FILE-- + '.$tmpfile ; + } else { + $cmd = $php . $args . ' -r \"readfile(@getenv(\\\\\\"TEST_PHP_EXECUTABLE\\\\\\")); \"'; + $cmd = $php . $args . ' -r " passthru(\''.$cmd.'\');" > '.$tmpfile ; + } + exec($cmd); + + if (md5_file($php) == md5_file($tmpfile)) { + echo "Works\n"; + } else { + echo "Does not work\n"; + } + + @unlink($tmpfile); +?> +--EXPECT-- +HELLO +Works diff --git a/ext/standard/tests/file/bug24313.phpt b/ext/standard/tests/file/bug24313.phpt new file mode 100644 index 0000000..e5bceee --- /dev/null +++ b/ext/standard/tests/file/bug24313.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #24313 (file_exists() throws a warning on nonexistent files when is open_basedir enabled) +--SKIPIF-- + +--INI-- +open_basedir=/dev +--FILE-- + +--EXPECT-- +bool(false) diff --git a/ext/standard/tests/file/bug24482.phpt b/ext/standard/tests/file/bug24482.phpt new file mode 100644 index 0000000..f545f1a --- /dev/null +++ b/ext/standard/tests/file/bug24482.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #24482 (GLOB_ONLYDIR not working) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +OK diff --git a/ext/standard/tests/file/bug26003.phpt b/ext/standard/tests/file/bug26003.phpt new file mode 100644 index 0000000..7d08374 Binary files /dev/null and b/ext/standard/tests/file/bug26003.phpt differ diff --git a/ext/standard/tests/file/bug26615.phpt b/ext/standard/tests/file/bug26615.phpt new file mode 100644 index 0000000..3689fdf --- /dev/null +++ b/ext/standard/tests/file/bug26615.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #26615 (exec crash on long input lines) +--INI-- +variables_order=E +--FILE-- + +--EXPECT-- +Array +( + [0] => 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 +) diff --git a/ext/standard/tests/file/bug26938.phpt b/ext/standard/tests/file/bug26938.phpt new file mode 100644 index 0000000..a68d572 --- /dev/null +++ b/ext/standard/tests/file/bug26938.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #26938 (exec does not read consecutive long lines correctly) +--FILE-- + +--EXPECT-- +md5(line 0)= e86410fa2d6e2634fd8ac5f4b3afe7f3 (length 10) +md5(line 1)= e84debf3a1d132871d7fe45c1c04c566 (length 20000) +md5(line 2)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000) +md5(line 3)= 2ecdde3959051d913f61b14579ea136d (length 5) +md5(line 4)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000) +md5(line 5)= 902fbdd2b1df0c4f70b4a5d23525e932 (length 3) diff --git a/ext/standard/tests/file/bug27508.phpt b/ext/standard/tests/file/bug27508.phpt new file mode 100644 index 0000000..7f012bd --- /dev/null +++ b/ext/standard/tests/file/bug27508.phpt @@ -0,0 +1,80 @@ +--TEST-- +Bug #27508 (userspace wrappers have bogus eof indicator) +--FILE-- +fp = fopen($url, $mode); + + return true; + } + + function stream_read($count) + { + return fread($this->fp, $count); + } + + function stream_write($data) + { + return fwrite($this->fp, $data); + } + + function stream_tell() + { + return ftell($this->fp); + } + + function stream_eof() + { + if (!$this->fp) { + return true; + } + return feof($this->fp); + } + + function stream_seek($offset, $whence) + { + return fseek($this->fp, $offset, $whence) == 0 ? true : false; + } +} + +stream_wrapper_register("myFile", "FileStream") + or die("Failed to register protocol"); + +$tmp_dir = __DIR__; +$tn = (binary) tempnam($tmp_dir, 'foo'); +if (!$tn) { + die("tempnam failed"); +} + +$fp = fopen("myFile://" . urlencode($tn), "w+"); +if (!$fp) { + die("fopen failed"); +} + +fwrite($fp, b"line1\n"); +fwrite($fp, b"line2\n"); +fwrite($fp, b"line3\n"); + +debug_zval_dump(feof($fp)); +rewind($fp); +echo ftell($fp) . "\n"; +debug_zval_dump(feof($fp)); +while ($fp && !feof($fp)) { + echo fgets($fp); +} +fclose($fp); + +unlink($tn); +?> +--EXPECT-- +bool(false) refcount(1) +0 +bool(false) refcount(1) +line1 +line2 +line3 diff --git a/ext/standard/tests/file/bug27619.phpt b/ext/standard/tests/file/bug27619.phpt new file mode 100644 index 0000000..095a18c --- /dev/null +++ b/ext/standard/tests/file/bug27619.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #27619 (filters not applied to pre-buffered data) +--FILE-- + +--EXPECT-- +this IS A LOWERCASE STRING. diff --git a/ext/standard/tests/file/bug30362.phpt b/ext/standard/tests/file/bug30362.phpt new file mode 100644 index 0000000..1c2b4be --- /dev/null +++ b/ext/standard/tests/file/bug30362.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #30362 (stream_get_line() not working as documented) +--FILE-- + +--EXPECT-- +111 +111111111 +111111111 +111111111 +111111111 +111111111 +111111111 +111111111 +111111111 +111111111 diff --git a/ext/standard/tests/file/bug30362.txt b/ext/standard/tests/file/bug30362.txt new file mode 100644 index 0000000..3a1b7f4 --- /dev/null +++ b/ext/standard/tests/file/bug30362.txt @@ -0,0 +1 @@ +111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111 diff --git a/ext/standard/tests/file/bug32160.phpt b/ext/standard/tests/file/bug32160.phpt new file mode 100644 index 0000000..e496803 --- /dev/null +++ b/ext/standard/tests/file/bug32160.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #32160 (copying a file into itself leads to data loss) +--FILE-- + +--EXPECT-- +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/file/bug32160.txt b/ext/standard/tests/file/bug32160.txt new file mode 100644 index 0000000..1e4a6b5 --- /dev/null +++ b/ext/standard/tests/file/bug32160.txt @@ -0,0 +1 @@ +copy test diff --git a/ext/standard/tests/file/bug35740.phpt b/ext/standard/tests/file/bug35740.phpt new file mode 100644 index 0000000..3526b24 --- /dev/null +++ b/ext/standard/tests/file/bug35740.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #35740 (memory leak when including a directory) +--FILE-- + +--EXPECTF-- +Warning: include(%s): failed to open stream: %s in %s on line %d + +Warning: include(): Failed opening '%s' for inclusion (include_path='%s') in %s on line %d +Done diff --git a/ext/standard/tests/file/bug35781.phpt b/ext/standard/tests/file/bug35781.phpt new file mode 100644 index 0000000..5dc684a --- /dev/null +++ b/ext/standard/tests/file/bug35781.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #35781 (stream_filter_append() causes segfault) +--FILE-- + +--EXPECTF-- +string(15) "Guvf vf n grfg +" +Done diff --git a/ext/standard/tests/file/bug37158.phpt b/ext/standard/tests/file/bug37158.phpt new file mode 100644 index 0000000..48df46c --- /dev/null +++ b/ext/standard/tests/file/bug37158.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #37158 (if userspace stream is present, fread() reads in 8192 max, otherwise it works) +--FILE-- + +--EXPECT-- +string(26) "size of contents 1 = 20000" +string(26) "size of contents 2 = 40960" +Done diff --git a/ext/standard/tests/file/bug37864.phpt b/ext/standard/tests/file/bug37864.phpt new file mode 100644 index 0000000..f8743bd --- /dev/null +++ b/ext/standard/tests/file/bug37864.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #37864 (file_get_contents() leaks on empty file) +--FILE-- + +--EXPECT-- +string(0) "" +done. diff --git a/ext/standard/tests/file/bug38086.phpt b/ext/standard/tests/file/bug38086.phpt new file mode 100644 index 0000000..d92289e --- /dev/null +++ b/ext/standard/tests/file/bug38086.phpt @@ -0,0 +1,55 @@ +--TEST-- +Bug #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger than the actual length) +--FILE-- + +--EXPECTF-- +int(%d) +string(134) "Nabgure qnl +Jura gur cnvaf bs yvsr jba'g one zl jnl +V'yy oernx gurfr punvaf +Gung ubyq zr qbja +V'yy grne lbh qbja vagb zl cevingr uryy +" +int(%d) +string(134) "Nabgure qnl +Jura gur cnvaf bs yvsr jba'g one zl jnl +V'yy oernx gurfr punvaf +Gung ubyq zr qbja +V'yy grne lbh qbja vagb zl cevingr uryy +" +Done diff --git a/ext/standard/tests/file/bug38086.txt b/ext/standard/tests/file/bug38086.txt new file mode 100644 index 0000000..8e32472 --- /dev/null +++ b/ext/standard/tests/file/bug38086.txt @@ -0,0 +1,5 @@ +Another day +When the pains of life won't bar my way +I'll break these chains +That hold me down +I'll tear you down into my private hell diff --git a/ext/standard/tests/file/bug38450.phpt b/ext/standard/tests/file/bug38450.phpt new file mode 100644 index 0000000..d108897 --- /dev/null +++ b/ext/standard/tests/file/bug38450.phpt @@ -0,0 +1,114 @@ +--TEST-- +Bug #38450 (constructor is not called for classes used in userspace stream wrappers) +--FILE-- +varname = $url["host"]; + $this->position = 0; + + return true; + } + + function stream_read($count) + { + $ret = substr($GLOBALS[$this->varname], $this->position, $count); + $this->position += strlen($ret); + return $ret; + } + + function stream_write($data) + { + $left = substr($GLOBALS[$this->varname], 0, $this->position); + $right = substr($GLOBALS[$this->varname], $this->position + strlen($data)); + $GLOBALS[$this->varname] = $left . $data . $right; + $this->position += strlen($data); + return strlen($data); + } + + function stream_tell() + { + return $this->position; + } + + function stream_eof() + { + return $this->position >= strlen($GLOBALS[$this->varname]); + } + function stream_seek($offset, $whence) + { + switch ($whence) { + case SEEK_SET: + if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) { + $this->position = $offset; + return true; + } else { + return false; + } + break; + + case SEEK_CUR: + if ($offset >= 0) { + $this->position += $offset; + return true; + } else { + return false; + } + break; + + case SEEK_END: + if (strlen($GLOBALS[$this->varname]) + $offset >= 0) { + $this->position = strlen($GLOBALS[$this->varname]) + $offset; + return true; + } else { + return false; + } + break; + + default: + return false; + } + } +} + +stream_wrapper_register("var", "VariableStream") + or die("Failed to register protocol"); + +$myvar = ""; + +$fp = fopen("var://myvar", "r+"); + +fwrite($fp, b"line1\n"); +fwrite($fp, b"line2\n"); +fwrite($fp, b"line3\n"); + +rewind($fp); +while (!feof($fp)) { + echo fgets($fp); +} +fclose($fp); +var_dump($myvar); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: Missing argument 1 for VariableStream::VariableStream() in %s on line %d +string(12) "constructor!" +line1 +line2 +line3 +string(18) "line1 +line2 +line3 +" +Done diff --git a/ext/standard/tests/file/bug38450_1.phpt b/ext/standard/tests/file/bug38450_1.phpt new file mode 100644 index 0000000..07e413b --- /dev/null +++ b/ext/standard/tests/file/bug38450_1.phpt @@ -0,0 +1,114 @@ +--TEST-- +Bug #38450 (constructor is not called for classes used in userspace stream wrappers) +--FILE-- +varname = $url["host"]; + $this->position = 0; + + return true; + } + + function stream_read($count) + { + $ret = substr($GLOBALS[$this->varname], $this->position, $count); + $this->position += strlen($ret); + return $ret; + } + + function stream_write($data) + { + $left = substr($GLOBALS[$this->varname], 0, $this->position); + $right = substr($GLOBALS[$this->varname], $this->position + strlen($data)); + $GLOBALS[$this->varname] = $left . $data . $right; + $this->position += strlen($data); + return strlen($data); + } + + function stream_tell() + { + return $this->position; + } + + function stream_eof() + { + return $this->position >= strlen($GLOBALS[$this->varname]); + } + function stream_seek($offset, $whence) + { + switch ($whence) { + case SEEK_SET: + if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) { + $this->position = $offset; + return true; + } else { + return false; + } + break; + + case SEEK_CUR: + if ($offset >= 0) { + $this->position += $offset; + return true; + } else { + return false; + } + break; + + case SEEK_END: + if (strlen($GLOBALS[$this->varname]) + $offset >= 0) { + $this->position = strlen($GLOBALS[$this->varname]) + $offset; + return true; + } else { + return false; + } + break; + + default: + return false; + } + } +} + +stream_wrapper_register("var", "VariableStream") + or die("Failed to register protocol"); + +$myvar = ""; + +$fp = fopen("var://myvar", "r+"); + +fwrite($fp, b"line1\n"); +fwrite($fp, b"line2\n"); +fwrite($fp, b"line3\n"); + +rewind($fp); +while (!feof($fp)) { + echo fgets($fp); +} +fclose($fp); +var_dump($myvar); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: Missing argument 1 for VariableStream::__construct() in %s on line %d +string(12) "constructor!" +line1 +line2 +line3 +string(18) "line1 +line2 +line3 +" +Done diff --git a/ext/standard/tests/file/bug38450_2.phpt b/ext/standard/tests/file/bug38450_2.phpt new file mode 100644 index 0000000..625fd7c --- /dev/null +++ b/ext/standard/tests/file/bug38450_2.phpt @@ -0,0 +1,114 @@ +--TEST-- +Bug #38450 (constructor is not called for classes used in userspace stream wrappers) +--FILE-- +varname = $url["host"]; + $this->position = 0; + + return true; + } + + function stream_read($count) + { + $ret = substr($GLOBALS[$this->varname], $this->position, $count); + $this->position += strlen($ret); + return $ret; + } + + function stream_write($data) + { + $left = substr($GLOBALS[$this->varname], 0, $this->position); + $right = substr($GLOBALS[$this->varname], $this->position + strlen($data)); + $GLOBALS[$this->varname] = $left . $data . $right; + $this->position += strlen($data); + return strlen($data); + } + + function stream_tell() + { + return $this->position; + } + + function stream_eof() + { + return $this->position >= strlen($GLOBALS[$this->varname]); + } + function stream_seek($offset, $whence) + { + switch ($whence) { + case SEEK_SET: + if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) { + $this->position = $offset; + return true; + } else { + return false; + } + break; + + case SEEK_CUR: + if ($offset >= 0) { + $this->position += $offset; + return true; + } else { + return false; + } + break; + + case SEEK_END: + if (strlen($GLOBALS[$this->varname]) + $offset >= 0) { + $this->position = strlen($GLOBALS[$this->varname]) + $offset; + return true; + } else { + return false; + } + break; + + default: + return false; + } + } +} + +stream_wrapper_register("var", "VariableStream") + or die("Failed to register protocol"); + +$myvar = ""; + +$fp = fopen("var://myvar", "r+"); + +fwrite($fp, "line1\n"); +fwrite($fp, "line2\n"); +fwrite($fp, "line3\n"); + +rewind($fp); +while (!feof($fp)) { + echo fgets($fp); +} +fclose($fp); +var_dump($myvar); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: Missing argument 1 for VariableStream::__construct() in %s on line %d + +Warning: fopen(var://myvar): failed to open stream: "VariableStream::stream_open" call failed in %s on line %d + +Fatal error: Uncaught exception 'Exception' with message 'constructor' in %s:%d +Stack trace: +#0 [internal function]: VariableStream->__construct() +#1 %s(%d): fopen('var://myvar', 'r+') +#2 {main} + thrown in %s on line %d diff --git a/ext/standard/tests/file/bug38450_3.phpt b/ext/standard/tests/file/bug38450_3.phpt new file mode 100644 index 0000000..389de87 --- /dev/null +++ b/ext/standard/tests/file/bug38450_3.phpt @@ -0,0 +1,105 @@ +--TEST-- +Bug #38450 (constructor is not called for classes used in userspace stream wrappers) +--FILE-- +varname = $url["host"]; + $this->position = 0; + + return true; + } + + function stream_read($count) + { + $ret = substr($GLOBALS[$this->varname], $this->position, $count); + $this->position += strlen($ret); + return $ret; + } + + function stream_write($data) + { + $left = substr($GLOBALS[$this->varname], 0, $this->position); + $right = substr($GLOBALS[$this->varname], $this->position + strlen($data)); + $GLOBALS[$this->varname] = $left . $data . $right; + $this->position += strlen($data); + return strlen($data); + } + + function stream_tell() + { + return $this->position; + } + + function stream_eof() + { + return $this->position >= strlen($GLOBALS[$this->varname]); + } + function stream_seek($offset, $whence) + { + switch ($whence) { + case SEEK_SET: + if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) { + $this->position = $offset; + return true; + } else { + return false; + } + break; + + case SEEK_CUR: + if ($offset >= 0) { + $this->position += $offset; + return true; + } else { + return false; + } + break; + + case SEEK_END: + if (strlen($GLOBALS[$this->varname]) + $offset >= 0) { + $this->position = strlen($GLOBALS[$this->varname]) + $offset; + return true; + } else { + return false; + } + break; + + default: + return false; + } + } +} + +stream_wrapper_register("var", "VariableStream") + or die("Failed to register protocol"); + +$myvar = ""; + +$fp = fopen("var://myvar", "r+"); + +fwrite($fp, "line1\n"); +fwrite($fp, "line2\n"); +fwrite($fp, "line3\n"); + +rewind($fp); +while (!feof($fp)) { + echo fgets($fp); +} +fclose($fp); +var_dump($myvar); + +echo "Done\n"; +?> +--EXPECTF-- +Catchable fatal error: Argument 1 passed to VariableStream::__construct() must be of the type array, none given in %s on line %d diff --git a/ext/standard/tests/file/bug39367.phpt b/ext/standard/tests/file/bug39367.phpt new file mode 100644 index 0000000..f3e79fc --- /dev/null +++ b/ext/standard/tests/file/bug39367.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #39367 (clearstatcache() doesn't clear realpath cache) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +ok diff --git a/ext/standard/tests/file/bug39538.phpt b/ext/standard/tests/file/bug39538.phpt new file mode 100644 index 0000000..71b5dea --- /dev/null +++ b/ext/standard/tests/file/bug39538.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #39538 (fgetcsv can't handle starting newlines and trailing odd number of backslashes) +--FILE-- + +--EXPECT-- +Array +( + [0] => +this is an test + [1] => next data + [2] => p +arsed +) +Array +( + [0] => +this is an test + [1] => next data + [2] => p +arsed +) +Array +( + [0] => + this is an test + [1] => next data + [2] => p + arsed +) diff --git a/ext/standard/tests/file/bug39551.phpt b/ext/standard/tests/file/bug39551.phpt new file mode 100644 index 0000000..c047a30 --- /dev/null +++ b/ext/standard/tests/file/bug39551.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #39551 (Segfault with stream_bucket_new in user filter) +--FILE-- + +--EXPECTF-- +Done diff --git a/ext/standard/tests/file/bug39673.phpt b/ext/standard/tests/file/bug39673.phpt new file mode 100644 index 0000000..3836f21 --- /dev/null +++ b/ext/standard/tests/file/bug39673.phpt @@ -0,0 +1,40 @@ +--TEST-- +Bug #39673 (file_get_contents causes bus error on certain offsets) +--FILE-- + +--EXPECTF-- +int(13824) +int(13824) +int(0) +int(1) +int(0) +int(11824) +int(8824) +int(0) +Done diff --git a/ext/standard/tests/file/bug39863.phpt b/ext/standard/tests/file/bug39863.phpt new file mode 100644 index 0000000..5e26b5a --- /dev/null +++ b/ext/standard/tests/file/bug39863.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #39863 (file_exists() silently truncates after a null byte) +--CREDITS-- +Andrew van der Stock, vanderaj @ owasp.org +--FILE-- + +===DONE=== + +--EXPECTF-- +Warning: file_exists() expects parameter 1 to be a valid path, string given in %s on line %d +PASS +===DONE=== + diff --git a/ext/standard/tests/file/bug40374.phpt b/ext/standard/tests/file/bug40374.phpt new file mode 100644 index 0000000..327289e --- /dev/null +++ b/ext/standard/tests/file/bug40374.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #40374 (php_shutdown_temporary_directory() tries to free local value) +--FILE-- + +--EXPECTF-- +string(%d) "%s" +Done diff --git a/ext/standard/tests/file/bug40501.csv b/ext/standard/tests/file/bug40501.csv new file mode 100644 index 0000000..c786ed9 --- /dev/null +++ b/ext/standard/tests/file/bug40501.csv @@ -0,0 +1,2 @@ +"this element contains the delimiter, and ends with an odd number of +backslashes (ex: 1)\",and it isn't the last element$ \ No newline at end of file diff --git a/ext/standard/tests/file/bug40501.phpt b/ext/standard/tests/file/bug40501.phpt new file mode 100644 index 0000000..806aba6 --- /dev/null +++ b/ext/standard/tests/file/bug40501.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #40501 (fgetcsv() can't handle trailing odd number of backslashes) +--FILE-- + +--EXPECTF-- +array(2) { + [0]=> + string(%d) "this element contains the delimiter, and ends with an odd number of +backslashes (ex: 1)\" + [1]=> + string(%d) "and it isn't the last element$" +} diff --git a/ext/standard/tests/file/bug41655_1.phpt b/ext/standard/tests/file/bug41655_1.phpt new file mode 100644 index 0000000..62d64df --- /dev/null +++ b/ext/standard/tests/file/bug41655_1.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #41655 (open_basedir bypass via glob()) 1/2 +--CREDITS-- +Dave Kelsey +--INI-- +open_basedir=/tmp +--FILE-- + +--EXPECT-- +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/bug41655_2.phpt b/ext/standard/tests/file/bug41655_2.phpt new file mode 100644 index 0000000..d406f1b --- /dev/null +++ b/ext/standard/tests/file/bug41655_2.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #41655 (open_basedir bypass via glob()) 2/2 +--INI-- +open_basedir=/ +--FILE-- + +--EXPECTF-- +Array +( + [0] => %stest.csv +) diff --git a/ext/standard/tests/file/bug41693.phpt b/ext/standard/tests/file/bug41693.phpt new file mode 100644 index 0000000..6c7ff5b --- /dev/null +++ b/ext/standard/tests/file/bug41693.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #41693 (scandir() allows empty directory names) +--FILE-- + +--EXPECTF-- +Warning: scandir(): Directory name cannot be empty in %s on line %d +bool(false) +Done diff --git a/ext/standard/tests/file/bug41815.phpt b/ext/standard/tests/file/bug41815.phpt new file mode 100644 index 0000000..f77468d --- /dev/null +++ b/ext/standard/tests/file/bug41815.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #41815 (Concurrent read/write fails when EOF is reached) +--FILE-- + 0) { + echo "OK\n"; +} + +fclose($writer); +fclose($reader); + +@unlink($filename); + +echo "Done\n"; +?> +--EXPECTF-- +OK +Done diff --git a/ext/standard/tests/file/bug41874.phpt b/ext/standard/tests/file/bug41874.phpt new file mode 100644 index 0000000..827f486 --- /dev/null +++ b/ext/standard/tests/file/bug41874.phpt @@ -0,0 +1,15 @@ +--TEST-- +bug #41874 (Separate STDOUT and STDERR in exec functions) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The system cannot find the drive specified. +The system cannot find the drive specified. diff --git a/ext/standard/tests/file/bug41874_1.phpt b/ext/standard/tests/file/bug41874_1.phpt new file mode 100644 index 0000000..c6ddef8 --- /dev/null +++ b/ext/standard/tests/file/bug41874_1.phpt @@ -0,0 +1,16 @@ +--TEST-- +bug #41874 (Separate STDOUT and STDERR in exec functions) +--CREDITS-- +Venkat Raman Don +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The system cannot find the drive specified. \ No newline at end of file diff --git a/ext/standard/tests/file/bug41874_2.phpt b/ext/standard/tests/file/bug41874_2.phpt new file mode 100644 index 0000000..5d7b7ca --- /dev/null +++ b/ext/standard/tests/file/bug41874_2.phpt @@ -0,0 +1,17 @@ +--TEST-- +bug #41874 (Separate STDOUT and STDERR in exec functions) +--CREDITS-- +Venkat Raman Don +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The system cannot find the drive specified. \ No newline at end of file diff --git a/ext/standard/tests/file/bug41874_3.phpt b/ext/standard/tests/file/bug41874_3.phpt new file mode 100644 index 0000000..4d7b139 --- /dev/null +++ b/ext/standard/tests/file/bug41874_3.phpt @@ -0,0 +1,16 @@ +--TEST-- +bug #41874 (Separate STDOUT and STDERR in exec functions) +--CREDITS-- +Venkat Raman Don +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The system cannot find the drive specified. \ No newline at end of file diff --git a/ext/standard/tests/file/bug43008.phpt b/ext/standard/tests/file/bug43008.phpt new file mode 100644 index 0000000..d2e3efd --- /dev/null +++ b/ext/standard/tests/file/bug43008.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #43008 (php://filter uris ignore url encoded filternames and can't handle slashes) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +string(8) "foob%E2r" diff --git a/ext/standard/tests/file/bug43137.phpt b/ext/standard/tests/file/bug43137.phpt new file mode 100644 index 0000000..8125445 --- /dev/null +++ b/ext/standard/tests/file/bug43137.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #43137 (rmdir() and rename() do not clear statcache) +--FILE-- + +--EXPECT-- +bool(true) +bool(false) +bool(true) +bool(false) diff --git a/ext/standard/tests/file/bug43216.phpt b/ext/standard/tests/file/bug43216.phpt new file mode 100644 index 0000000..b7e4253 --- /dev/null +++ b/ext/standard/tests/file/bug43216.phpt @@ -0,0 +1,8 @@ +--TEST-- +Bug #43216 (stream_is_local() returns false on file://) +--FILE-- + +--EXPECT-- +bool(true) diff --git a/ext/standard/tests/file/bug43248.phpt b/ext/standard/tests/file/bug43248.phpt new file mode 100644 index 0000000..1096435 --- /dev/null +++ b/ext/standard/tests/file/bug43248.phpt @@ -0,0 +1,8 @@ +--TEST-- +Bug #43248 (backward compatibility break in realpath()) +--FILE-- + +--EXPECTF-- +%sfile diff --git a/ext/standard/tests/file/bug43353-win32.phpt b/ext/standard/tests/file/bug43353-win32.phpt new file mode 100644 index 0000000..0667f69 --- /dev/null +++ b/ext/standard/tests/file/bug43353-win32.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #43353 wrong detection of 'data' wrapper +--SKIPIF-- + +--INI-- +allow_url_fopen=1 +--FILE-- + +--EXPECTF-- +bool(false) +bool(false) +string(3) "foo" + +Warning: file_get_contents(datafoo:text/plain,foo): failed to open stream: Invalid argument in %s +bool(false) diff --git a/ext/standard/tests/file/bug43353.phpt b/ext/standard/tests/file/bug43353.phpt new file mode 100644 index 0000000..87d0650 --- /dev/null +++ b/ext/standard/tests/file/bug43353.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #43353 wrong detection of 'data' wrapper +--SKIPIF-- + +--INI-- +allow_url_fopen=1 +--FILE-- + +--EXPECTF-- +bool(false) +bool(false) +string(3) "foo" + +Warning: file_get_contents(datafoo:text/plain,foo): failed to open stream: No such file or directory in %s +bool(false) diff --git a/ext/standard/tests/file/bug43522.phpt b/ext/standard/tests/file/bug43522.phpt new file mode 100644 index 0000000..10e44fc --- /dev/null +++ b/ext/standard/tests/file/bug43522.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #43522 (stream_get_line() eats additional characters) +--FILE-- + +--EXPECT-- +Delimiter: ZZZ + "\\r", "\n" => "\\n")) . "\n"; + var_dump(file($url, FILE_IGNORE_NEW_LINES)); +} +?> +--EXPECTF-- +data://text/plain,foo\r\nbar\r\n +array(2) { + [0]=> + %unicode|string%(3) "foo" + [1]=> + %unicode|string%(3) "bar" +} +data://text/plain,\r\nfoo\r\nbar\r\n +array(3) { + [0]=> + %unicode|string%(0) "" + [1]=> + %unicode|string%(3) "foo" + [2]=> + %unicode|string%(3) "bar" +} +data://text/plain,foo\r\nbar +array(2) { + [0]=> + %unicode|string%(3) "foo" + [1]=> + %unicode|string%(3) "bar" +} diff --git a/ext/standard/tests/file/bug44607.phpt b/ext/standard/tests/file/bug44607.phpt new file mode 100644 index 0000000..dc5e4cb --- /dev/null +++ b/ext/standard/tests/file/bug44607.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #44607 (stream_get_line unable to correctly identify the "ending" in the stream content) +--FILE-- +'; +$tempnam = __DIR__ . '/' . 'tmpbug44607.txt'; +$data = str_repeat('.', 14000); +$data .= $eol; +$data .= $data; +file_put_contents($tempnam, $data); +$fd = fopen($tempnam, 'r'); +var_dump(strlen(stream_get_line($fd, 15000, $eol))); +var_dump(strlen(stream_get_line($fd, 15000, $eol))); +fseek($fd, 1, SEEK_SET); +var_dump(strlen(stream_get_line($fd, 15000, $eol))); +var_dump(strlen(stream_get_line($fd, 15000, $eol))); +fclose($fd); +unlink($tempnam); +?> +--EXPECT-- +int(14000) +int(14000) +int(13999) +int(14000) diff --git a/ext/standard/tests/file/bug44805.phpt b/ext/standard/tests/file/bug44805.phpt new file mode 100644 index 0000000..85f1255 --- /dev/null +++ b/ext/standard/tests/file/bug44805.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug#44806 (rename() function is not portable to Windows) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +reading file 2: this is file 1 diff --git a/ext/standard/tests/file/bug45181.phpt b/ext/standard/tests/file/bug45181.phpt new file mode 100644 index 0000000..d64fa89 --- /dev/null +++ b/ext/standard/tests/file/bug45181.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #45181 (chdir() should clear relative entries in stat cache) +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(true) +bool(false) diff --git a/ext/standard/tests/file/bug45303.phpt b/ext/standard/tests/file/bug45303.phpt new file mode 100644 index 0000000..0a4b33b --- /dev/null +++ b/ext/standard/tests/file/bug45303.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #45303 (Opening php:// wrapper in append mode results in a warning) +--FILE-- + +--EXPECTF-- +resource(%d) of type (stream) + +Warning: fseek(): stream does not support seeking in %s +int(-1) diff --git a/ext/standard/tests/file/bug45985.phpt b/ext/standard/tests/file/bug45985.phpt new file mode 100644 index 0000000..1b98da2 --- /dev/null +++ b/ext/standard/tests/file/bug45985.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #35740 (touch() opened file raises a warning) +--FILE-- + +--EXPECT-- +ok diff --git a/ext/standard/tests/file/bug46347.phpt b/ext/standard/tests/file/bug46347.phpt new file mode 100644 index 0000000..af81bc2 --- /dev/null +++ b/ext/standard/tests/file/bug46347.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #46347 (parse_ini_file() doesn't support * in keys) +--FILE-- + +--CLEAN-- + +--EXPECTF-- +array(1) { + [%u|b%"part1.*.part2"]=> + %unicode|string%(1) "1" +} diff --git a/ext/standard/tests/file/bug47767.phpt b/ext/standard/tests/file/bug47767.phpt new file mode 100644 index 0000000..312476a --- /dev/null +++ b/ext/standard/tests/file/bug47767.phpt @@ -0,0 +1,50 @@ +--TEST-- +bug #47767 (include_once does not resolve windows symlinks or junctions) +--CREDITS-- +Venkat Raman Don +--SKIPIF-- +&1', $out); +if (strpos($ret, 'privilege')) { + die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.'); +} +?> +--FILE-- +'; +file_put_contents($filename, $content); +$softlinkname = __DIR__ . '\\a_slink.php'; +symlink($filename, $softlinkname); +include_once("$filename"); +include_once("$softlinkname"); +include_once("$softlinkname"); + +echo "Testing include_once using directory symbolic link\n"; +$softdirlinkname = __DIR__ . "\\a_dir"; +symlink(__DIR__, $softdirlinkname); +include_once("$softdirlinkname" . '\\a.php'); + +echo "Testing include_once using junction points\n"; +$junctionname = __DIR__ . '\\a_jdir'; +exec("mklink /J $junctionname " . __DIR__); +include_once("$junctionname" . '\\a.php'); + +unlink($filename); +unlink($softlinkname); +rmdir($softdirlinkname); +rmdir($junctionname); +?> +--EXPECT-- +Testing include_once using file symbolic link +I am included +Testing include_once using directory symbolic link +Testing include_once using junction points \ No newline at end of file diff --git a/ext/standard/tests/file/bug49047.phpt b/ext/standard/tests/file/bug49047.phpt new file mode 100644 index 0000000..1ccc94e --- /dev/null +++ b/ext/standard/tests/file/bug49047.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test fopen() function : variation: interesting paths, no use include path +--FILE-- + +--EXPECTF-- +Ok. diff --git a/ext/standard/tests/file/bug51094.phpt b/ext/standard/tests/file/bug51094.phpt new file mode 100644 index 0000000..f35dfb6 --- /dev/null +++ b/ext/standard/tests/file/bug51094.phpt @@ -0,0 +1,22 @@ +--TEST-- +Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon). +--FILE-- + +--EXPECTF-- +Warning: tempnam(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt new file mode 100644 index 0000000..91976b0 --- /dev/null +++ b/ext/standard/tests/file/bug52820.phpt @@ -0,0 +1,71 @@ +--TEST-- +Bug #52820 (writes to fopencookie FILE* not commited when seeking the stream) +--SKIPIF-- + +--EXPECT-- +bool(true) +Done. diff --git a/ext/standard/tests/file/bug53848.phpt b/ext/standard/tests/file/bug53848.phpt new file mode 100644 index 0000000..016d59d --- /dev/null +++ b/ext/standard/tests/file/bug53848.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #53848 (fgetcsv removes leading spaces from fields) +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" +} +array(2) { + [0]=> + string(3) " c" + [1]=> + string(3) " d" +} diff --git a/ext/standard/tests/file/bug55124.phpt b/ext/standard/tests/file/bug55124.phpt new file mode 100644 index 0000000..1915b7f --- /dev/null +++ b/ext/standard/tests/file/bug55124.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #55124 (recursive mkdir fails with current (dot) directory in path) +--FILE-- + +--EXPECT-- +OK diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt new file mode 100644 index 0000000..8915bb8 --- /dev/null +++ b/ext/standard/tests/file/bug60120.phpt @@ -0,0 +1,74 @@ +--TEST-- +Bug #60120 (proc_open hangs when data in stdin/out/err is getting larger or equal to 2048) +--SKIPIF-- + +--FILE-- + true, 'binary_pipes' => true, 'bypass_shell' => false)); +$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array(), $options); + +foreach ($pipes as $pipe) { + stream_set_blocking($pipe, false); +} +$writePipes = array($pipes[0]); +$stdinLen = strlen($stdin); +$stdinOffset = 0; + +unset($pipes[0]); + +while ($pipes || $writePipes) { + $r = $pipes; + $w = $writePipes; + $e = null; + $n = stream_select($r, $w, $e, 60); + + if (false === $n) { + break; + } elseif ($n === 0) { + proc_terminate($process); + + } + if ($w) { + $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192); + if (false !== $written) { + $stdinOffset += $written; + } + if ($stdinOffset >= $stdinLen) { + fclose($writePipes[0]); + $writePipes = null; + } + } + + foreach ($r as $pipe) { + $type = array_search($pipe, $pipes); + $data = fread($pipe, 8192); + if (false === $data || feof($pipe)) { + fclose($pipe); + unset($pipes[$type]); + } + } +} +echo "OK."; +?> +--EXPECT-- +OK. diff --git a/ext/standard/tests/file/bug61961.phpt b/ext/standard/tests/file/bug61961.phpt new file mode 100644 index 0000000..ff0279a --- /dev/null +++ b/ext/standard/tests/file/bug61961.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #61961 (file_get_content leaks when access empty file with max length) +--FILE-- + +==DONE== +--EXPECT-- +string(0) "" +==DONE== \ No newline at end of file diff --git a/ext/standard/tests/file/bug63512.phpt b/ext/standard/tests/file/bug63512.phpt new file mode 100644 index 0000000..049db26 --- /dev/null +++ b/ext/standard/tests/file/bug63512.phpt @@ -0,0 +1,33 @@ +--TEST-- +Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value). +--FILE-- + + string(3) "123" + ["constant"]=> + string(12) "INSTALL_ROOT" + ["quotedString"]=> + string(6) "string" + ["a"]=> + string(18) "INSTALL_ROOT "waa"" + ["b"]=> + string(12) "INSTALL_ROOT" + ["c"]=> + string(18) ""waa" INSTALL_ROOT" + ["d"]=> + string(27) "INSTALL_ROOT "INSTALL_ROOT"" +} + diff --git a/ext/standard/tests/file/chgrp.phpt b/ext/standard/tests/file/chgrp.phpt new file mode 100644 index 0000000..9c85f5c --- /dev/null +++ b/ext/standard/tests/file/chgrp.phpt @@ -0,0 +1,15 @@ +--TEST-- +chgrp() with NULL as group name +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: chgrp(): parameter 2 should be string or integer, null given in %schgrp.php on line 2 +ALIVE diff --git a/ext/standard/tests/file/chmod_basic-win32.phpt b/ext/standard/tests/file/chmod_basic-win32.phpt new file mode 100644 index 0000000..ca224f7 --- /dev/null +++ b/ext/standard/tests/file/chmod_basic-win32.phpt @@ -0,0 +1,545 @@ +--TEST-- +chmod() basic fuctionality +--SKIPIF-- + +--FILE-- += 0; $perms_to_set--) { + chmod($filename, $perms_to_set); + $set_perms = (fileperms($filename) & PERMISSIONS_MASK); + clearstatcache(); + printf("Setting mode %o gives mode %o\n", $perms_to_set, $set_perms); +} +var_dump(chmod($filename, 0777)); + +unlink($filename); +echo "done"; + +?> +--EXPECT-- +Setting mode 777 gives mode 666 +Setting mode 776 gives mode 666 +Setting mode 775 gives mode 666 +Setting mode 774 gives mode 666 +Setting mode 773 gives mode 666 +Setting mode 772 gives mode 666 +Setting mode 771 gives mode 666 +Setting mode 770 gives mode 666 +Setting mode 767 gives mode 666 +Setting mode 766 gives mode 666 +Setting mode 765 gives mode 666 +Setting mode 764 gives mode 666 +Setting mode 763 gives mode 666 +Setting mode 762 gives mode 666 +Setting mode 761 gives mode 666 +Setting mode 760 gives mode 666 +Setting mode 757 gives mode 666 +Setting mode 756 gives mode 666 +Setting mode 755 gives mode 666 +Setting mode 754 gives mode 666 +Setting mode 753 gives mode 666 +Setting mode 752 gives mode 666 +Setting mode 751 gives mode 666 +Setting mode 750 gives mode 666 +Setting mode 747 gives mode 666 +Setting mode 746 gives mode 666 +Setting mode 745 gives mode 666 +Setting mode 744 gives mode 666 +Setting mode 743 gives mode 666 +Setting mode 742 gives mode 666 +Setting mode 741 gives mode 666 +Setting mode 740 gives mode 666 +Setting mode 737 gives mode 666 +Setting mode 736 gives mode 666 +Setting mode 735 gives mode 666 +Setting mode 734 gives mode 666 +Setting mode 733 gives mode 666 +Setting mode 732 gives mode 666 +Setting mode 731 gives mode 666 +Setting mode 730 gives mode 666 +Setting mode 727 gives mode 666 +Setting mode 726 gives mode 666 +Setting mode 725 gives mode 666 +Setting mode 724 gives mode 666 +Setting mode 723 gives mode 666 +Setting mode 722 gives mode 666 +Setting mode 721 gives mode 666 +Setting mode 720 gives mode 666 +Setting mode 717 gives mode 666 +Setting mode 716 gives mode 666 +Setting mode 715 gives mode 666 +Setting mode 714 gives mode 666 +Setting mode 713 gives mode 666 +Setting mode 712 gives mode 666 +Setting mode 711 gives mode 666 +Setting mode 710 gives mode 666 +Setting mode 707 gives mode 666 +Setting mode 706 gives mode 666 +Setting mode 705 gives mode 666 +Setting mode 704 gives mode 666 +Setting mode 703 gives mode 666 +Setting mode 702 gives mode 666 +Setting mode 701 gives mode 666 +Setting mode 700 gives mode 666 +Setting mode 677 gives mode 666 +Setting mode 676 gives mode 666 +Setting mode 675 gives mode 666 +Setting mode 674 gives mode 666 +Setting mode 673 gives mode 666 +Setting mode 672 gives mode 666 +Setting mode 671 gives mode 666 +Setting mode 670 gives mode 666 +Setting mode 667 gives mode 666 +Setting mode 666 gives mode 666 +Setting mode 665 gives mode 666 +Setting mode 664 gives mode 666 +Setting mode 663 gives mode 666 +Setting mode 662 gives mode 666 +Setting mode 661 gives mode 666 +Setting mode 660 gives mode 666 +Setting mode 657 gives mode 666 +Setting mode 656 gives mode 666 +Setting mode 655 gives mode 666 +Setting mode 654 gives mode 666 +Setting mode 653 gives mode 666 +Setting mode 652 gives mode 666 +Setting mode 651 gives mode 666 +Setting mode 650 gives mode 666 +Setting mode 647 gives mode 666 +Setting mode 646 gives mode 666 +Setting mode 645 gives mode 666 +Setting mode 644 gives mode 666 +Setting mode 643 gives mode 666 +Setting mode 642 gives mode 666 +Setting mode 641 gives mode 666 +Setting mode 640 gives mode 666 +Setting mode 637 gives mode 666 +Setting mode 636 gives mode 666 +Setting mode 635 gives mode 666 +Setting mode 634 gives mode 666 +Setting mode 633 gives mode 666 +Setting mode 632 gives mode 666 +Setting mode 631 gives mode 666 +Setting mode 630 gives mode 666 +Setting mode 627 gives mode 666 +Setting mode 626 gives mode 666 +Setting mode 625 gives mode 666 +Setting mode 624 gives mode 666 +Setting mode 623 gives mode 666 +Setting mode 622 gives mode 666 +Setting mode 621 gives mode 666 +Setting mode 620 gives mode 666 +Setting mode 617 gives mode 666 +Setting mode 616 gives mode 666 +Setting mode 615 gives mode 666 +Setting mode 614 gives mode 666 +Setting mode 613 gives mode 666 +Setting mode 612 gives mode 666 +Setting mode 611 gives mode 666 +Setting mode 610 gives mode 666 +Setting mode 607 gives mode 666 +Setting mode 606 gives mode 666 +Setting mode 605 gives mode 666 +Setting mode 604 gives mode 666 +Setting mode 603 gives mode 666 +Setting mode 602 gives mode 666 +Setting mode 601 gives mode 666 +Setting mode 600 gives mode 666 +Setting mode 577 gives mode 444 +Setting mode 576 gives mode 444 +Setting mode 575 gives mode 444 +Setting mode 574 gives mode 444 +Setting mode 573 gives mode 444 +Setting mode 572 gives mode 444 +Setting mode 571 gives mode 444 +Setting mode 570 gives mode 444 +Setting mode 567 gives mode 444 +Setting mode 566 gives mode 444 +Setting mode 565 gives mode 444 +Setting mode 564 gives mode 444 +Setting mode 563 gives mode 444 +Setting mode 562 gives mode 444 +Setting mode 561 gives mode 444 +Setting mode 560 gives mode 444 +Setting mode 557 gives mode 444 +Setting mode 556 gives mode 444 +Setting mode 555 gives mode 444 +Setting mode 554 gives mode 444 +Setting mode 553 gives mode 444 +Setting mode 552 gives mode 444 +Setting mode 551 gives mode 444 +Setting mode 550 gives mode 444 +Setting mode 547 gives mode 444 +Setting mode 546 gives mode 444 +Setting mode 545 gives mode 444 +Setting mode 544 gives mode 444 +Setting mode 543 gives mode 444 +Setting mode 542 gives mode 444 +Setting mode 541 gives mode 444 +Setting mode 540 gives mode 444 +Setting mode 537 gives mode 444 +Setting mode 536 gives mode 444 +Setting mode 535 gives mode 444 +Setting mode 534 gives mode 444 +Setting mode 533 gives mode 444 +Setting mode 532 gives mode 444 +Setting mode 531 gives mode 444 +Setting mode 530 gives mode 444 +Setting mode 527 gives mode 444 +Setting mode 526 gives mode 444 +Setting mode 525 gives mode 444 +Setting mode 524 gives mode 444 +Setting mode 523 gives mode 444 +Setting mode 522 gives mode 444 +Setting mode 521 gives mode 444 +Setting mode 520 gives mode 444 +Setting mode 517 gives mode 444 +Setting mode 516 gives mode 444 +Setting mode 515 gives mode 444 +Setting mode 514 gives mode 444 +Setting mode 513 gives mode 444 +Setting mode 512 gives mode 444 +Setting mode 511 gives mode 444 +Setting mode 510 gives mode 444 +Setting mode 507 gives mode 444 +Setting mode 506 gives mode 444 +Setting mode 505 gives mode 444 +Setting mode 504 gives mode 444 +Setting mode 503 gives mode 444 +Setting mode 502 gives mode 444 +Setting mode 501 gives mode 444 +Setting mode 500 gives mode 444 +Setting mode 477 gives mode 444 +Setting mode 476 gives mode 444 +Setting mode 475 gives mode 444 +Setting mode 474 gives mode 444 +Setting mode 473 gives mode 444 +Setting mode 472 gives mode 444 +Setting mode 471 gives mode 444 +Setting mode 470 gives mode 444 +Setting mode 467 gives mode 444 +Setting mode 466 gives mode 444 +Setting mode 465 gives mode 444 +Setting mode 464 gives mode 444 +Setting mode 463 gives mode 444 +Setting mode 462 gives mode 444 +Setting mode 461 gives mode 444 +Setting mode 460 gives mode 444 +Setting mode 457 gives mode 444 +Setting mode 456 gives mode 444 +Setting mode 455 gives mode 444 +Setting mode 454 gives mode 444 +Setting mode 453 gives mode 444 +Setting mode 452 gives mode 444 +Setting mode 451 gives mode 444 +Setting mode 450 gives mode 444 +Setting mode 447 gives mode 444 +Setting mode 446 gives mode 444 +Setting mode 445 gives mode 444 +Setting mode 444 gives mode 444 +Setting mode 443 gives mode 444 +Setting mode 442 gives mode 444 +Setting mode 441 gives mode 444 +Setting mode 440 gives mode 444 +Setting mode 437 gives mode 444 +Setting mode 436 gives mode 444 +Setting mode 435 gives mode 444 +Setting mode 434 gives mode 444 +Setting mode 433 gives mode 444 +Setting mode 432 gives mode 444 +Setting mode 431 gives mode 444 +Setting mode 430 gives mode 444 +Setting mode 427 gives mode 444 +Setting mode 426 gives mode 444 +Setting mode 425 gives mode 444 +Setting mode 424 gives mode 444 +Setting mode 423 gives mode 444 +Setting mode 422 gives mode 444 +Setting mode 421 gives mode 444 +Setting mode 420 gives mode 444 +Setting mode 417 gives mode 444 +Setting mode 416 gives mode 444 +Setting mode 415 gives mode 444 +Setting mode 414 gives mode 444 +Setting mode 413 gives mode 444 +Setting mode 412 gives mode 444 +Setting mode 411 gives mode 444 +Setting mode 410 gives mode 444 +Setting mode 407 gives mode 444 +Setting mode 406 gives mode 444 +Setting mode 405 gives mode 444 +Setting mode 404 gives mode 444 +Setting mode 403 gives mode 444 +Setting mode 402 gives mode 444 +Setting mode 401 gives mode 444 +Setting mode 400 gives mode 444 +Setting mode 377 gives mode 666 +Setting mode 376 gives mode 666 +Setting mode 375 gives mode 666 +Setting mode 374 gives mode 666 +Setting mode 373 gives mode 666 +Setting mode 372 gives mode 666 +Setting mode 371 gives mode 666 +Setting mode 370 gives mode 666 +Setting mode 367 gives mode 666 +Setting mode 366 gives mode 666 +Setting mode 365 gives mode 666 +Setting mode 364 gives mode 666 +Setting mode 363 gives mode 666 +Setting mode 362 gives mode 666 +Setting mode 361 gives mode 666 +Setting mode 360 gives mode 666 +Setting mode 357 gives mode 666 +Setting mode 356 gives mode 666 +Setting mode 355 gives mode 666 +Setting mode 354 gives mode 666 +Setting mode 353 gives mode 666 +Setting mode 352 gives mode 666 +Setting mode 351 gives mode 666 +Setting mode 350 gives mode 666 +Setting mode 347 gives mode 666 +Setting mode 346 gives mode 666 +Setting mode 345 gives mode 666 +Setting mode 344 gives mode 666 +Setting mode 343 gives mode 666 +Setting mode 342 gives mode 666 +Setting mode 341 gives mode 666 +Setting mode 340 gives mode 666 +Setting mode 337 gives mode 666 +Setting mode 336 gives mode 666 +Setting mode 335 gives mode 666 +Setting mode 334 gives mode 666 +Setting mode 333 gives mode 666 +Setting mode 332 gives mode 666 +Setting mode 331 gives mode 666 +Setting mode 330 gives mode 666 +Setting mode 327 gives mode 666 +Setting mode 326 gives mode 666 +Setting mode 325 gives mode 666 +Setting mode 324 gives mode 666 +Setting mode 323 gives mode 666 +Setting mode 322 gives mode 666 +Setting mode 321 gives mode 666 +Setting mode 320 gives mode 666 +Setting mode 317 gives mode 666 +Setting mode 316 gives mode 666 +Setting mode 315 gives mode 666 +Setting mode 314 gives mode 666 +Setting mode 313 gives mode 666 +Setting mode 312 gives mode 666 +Setting mode 311 gives mode 666 +Setting mode 310 gives mode 666 +Setting mode 307 gives mode 666 +Setting mode 306 gives mode 666 +Setting mode 305 gives mode 666 +Setting mode 304 gives mode 666 +Setting mode 303 gives mode 666 +Setting mode 302 gives mode 666 +Setting mode 301 gives mode 666 +Setting mode 300 gives mode 666 +Setting mode 277 gives mode 666 +Setting mode 276 gives mode 666 +Setting mode 275 gives mode 666 +Setting mode 274 gives mode 666 +Setting mode 273 gives mode 666 +Setting mode 272 gives mode 666 +Setting mode 271 gives mode 666 +Setting mode 270 gives mode 666 +Setting mode 267 gives mode 666 +Setting mode 266 gives mode 666 +Setting mode 265 gives mode 666 +Setting mode 264 gives mode 666 +Setting mode 263 gives mode 666 +Setting mode 262 gives mode 666 +Setting mode 261 gives mode 666 +Setting mode 260 gives mode 666 +Setting mode 257 gives mode 666 +Setting mode 256 gives mode 666 +Setting mode 255 gives mode 666 +Setting mode 254 gives mode 666 +Setting mode 253 gives mode 666 +Setting mode 252 gives mode 666 +Setting mode 251 gives mode 666 +Setting mode 250 gives mode 666 +Setting mode 247 gives mode 666 +Setting mode 246 gives mode 666 +Setting mode 245 gives mode 666 +Setting mode 244 gives mode 666 +Setting mode 243 gives mode 666 +Setting mode 242 gives mode 666 +Setting mode 241 gives mode 666 +Setting mode 240 gives mode 666 +Setting mode 237 gives mode 666 +Setting mode 236 gives mode 666 +Setting mode 235 gives mode 666 +Setting mode 234 gives mode 666 +Setting mode 233 gives mode 666 +Setting mode 232 gives mode 666 +Setting mode 231 gives mode 666 +Setting mode 230 gives mode 666 +Setting mode 227 gives mode 666 +Setting mode 226 gives mode 666 +Setting mode 225 gives mode 666 +Setting mode 224 gives mode 666 +Setting mode 223 gives mode 666 +Setting mode 222 gives mode 666 +Setting mode 221 gives mode 666 +Setting mode 220 gives mode 666 +Setting mode 217 gives mode 666 +Setting mode 216 gives mode 666 +Setting mode 215 gives mode 666 +Setting mode 214 gives mode 666 +Setting mode 213 gives mode 666 +Setting mode 212 gives mode 666 +Setting mode 211 gives mode 666 +Setting mode 210 gives mode 666 +Setting mode 207 gives mode 666 +Setting mode 206 gives mode 666 +Setting mode 205 gives mode 666 +Setting mode 204 gives mode 666 +Setting mode 203 gives mode 666 +Setting mode 202 gives mode 666 +Setting mode 201 gives mode 666 +Setting mode 200 gives mode 666 +Setting mode 177 gives mode 444 +Setting mode 176 gives mode 444 +Setting mode 175 gives mode 444 +Setting mode 174 gives mode 444 +Setting mode 173 gives mode 444 +Setting mode 172 gives mode 444 +Setting mode 171 gives mode 444 +Setting mode 170 gives mode 444 +Setting mode 167 gives mode 444 +Setting mode 166 gives mode 444 +Setting mode 165 gives mode 444 +Setting mode 164 gives mode 444 +Setting mode 163 gives mode 444 +Setting mode 162 gives mode 444 +Setting mode 161 gives mode 444 +Setting mode 160 gives mode 444 +Setting mode 157 gives mode 444 +Setting mode 156 gives mode 444 +Setting mode 155 gives mode 444 +Setting mode 154 gives mode 444 +Setting mode 153 gives mode 444 +Setting mode 152 gives mode 444 +Setting mode 151 gives mode 444 +Setting mode 150 gives mode 444 +Setting mode 147 gives mode 444 +Setting mode 146 gives mode 444 +Setting mode 145 gives mode 444 +Setting mode 144 gives mode 444 +Setting mode 143 gives mode 444 +Setting mode 142 gives mode 444 +Setting mode 141 gives mode 444 +Setting mode 140 gives mode 444 +Setting mode 137 gives mode 444 +Setting mode 136 gives mode 444 +Setting mode 135 gives mode 444 +Setting mode 134 gives mode 444 +Setting mode 133 gives mode 444 +Setting mode 132 gives mode 444 +Setting mode 131 gives mode 444 +Setting mode 130 gives mode 444 +Setting mode 127 gives mode 444 +Setting mode 126 gives mode 444 +Setting mode 125 gives mode 444 +Setting mode 124 gives mode 444 +Setting mode 123 gives mode 444 +Setting mode 122 gives mode 444 +Setting mode 121 gives mode 444 +Setting mode 120 gives mode 444 +Setting mode 117 gives mode 444 +Setting mode 116 gives mode 444 +Setting mode 115 gives mode 444 +Setting mode 114 gives mode 444 +Setting mode 113 gives mode 444 +Setting mode 112 gives mode 444 +Setting mode 111 gives mode 444 +Setting mode 110 gives mode 444 +Setting mode 107 gives mode 444 +Setting mode 106 gives mode 444 +Setting mode 105 gives mode 444 +Setting mode 104 gives mode 444 +Setting mode 103 gives mode 444 +Setting mode 102 gives mode 444 +Setting mode 101 gives mode 444 +Setting mode 100 gives mode 444 +Setting mode 77 gives mode 444 +Setting mode 76 gives mode 444 +Setting mode 75 gives mode 444 +Setting mode 74 gives mode 444 +Setting mode 73 gives mode 444 +Setting mode 72 gives mode 444 +Setting mode 71 gives mode 444 +Setting mode 70 gives mode 444 +Setting mode 67 gives mode 444 +Setting mode 66 gives mode 444 +Setting mode 65 gives mode 444 +Setting mode 64 gives mode 444 +Setting mode 63 gives mode 444 +Setting mode 62 gives mode 444 +Setting mode 61 gives mode 444 +Setting mode 60 gives mode 444 +Setting mode 57 gives mode 444 +Setting mode 56 gives mode 444 +Setting mode 55 gives mode 444 +Setting mode 54 gives mode 444 +Setting mode 53 gives mode 444 +Setting mode 52 gives mode 444 +Setting mode 51 gives mode 444 +Setting mode 50 gives mode 444 +Setting mode 47 gives mode 444 +Setting mode 46 gives mode 444 +Setting mode 45 gives mode 444 +Setting mode 44 gives mode 444 +Setting mode 43 gives mode 444 +Setting mode 42 gives mode 444 +Setting mode 41 gives mode 444 +Setting mode 40 gives mode 444 +Setting mode 37 gives mode 444 +Setting mode 36 gives mode 444 +Setting mode 35 gives mode 444 +Setting mode 34 gives mode 444 +Setting mode 33 gives mode 444 +Setting mode 32 gives mode 444 +Setting mode 31 gives mode 444 +Setting mode 30 gives mode 444 +Setting mode 27 gives mode 444 +Setting mode 26 gives mode 444 +Setting mode 25 gives mode 444 +Setting mode 24 gives mode 444 +Setting mode 23 gives mode 444 +Setting mode 22 gives mode 444 +Setting mode 21 gives mode 444 +Setting mode 20 gives mode 444 +Setting mode 17 gives mode 444 +Setting mode 16 gives mode 444 +Setting mode 15 gives mode 444 +Setting mode 14 gives mode 444 +Setting mode 13 gives mode 444 +Setting mode 12 gives mode 444 +Setting mode 11 gives mode 444 +Setting mode 10 gives mode 444 +Setting mode 7 gives mode 444 +Setting mode 6 gives mode 444 +Setting mode 5 gives mode 444 +Setting mode 4 gives mode 444 +Setting mode 3 gives mode 444 +Setting mode 2 gives mode 444 +Setting mode 1 gives mode 444 +Setting mode 0 gives mode 444 +bool(true) +done diff --git a/ext/standard/tests/file/chmod_basic.phpt b/ext/standard/tests/file/chmod_basic.phpt new file mode 100644 index 0000000..582f273 --- /dev/null +++ b/ext/standard/tests/file/chmod_basic.phpt @@ -0,0 +1,35 @@ +--TEST-- +chmod() basic fuctionality +--SKIPIF-- + +--FILE-- += 0; $perms_to_set--) { + chmod($filename, $perms_to_set); + $set_perms = (fileperms($filename) & MODE_MASK); + clearstatcache(); + if ($set_perms != $perms_to_set) { + printf("Error: %o does not match %o\n", $set_perms, $perms_to_set); + } +} +var_dump(chmod($filename, 0777)); + +unlink($filename); +echo "done"; + +?> +--EXPECT-- +bool(true) +done diff --git a/ext/standard/tests/file/chmod_error.phpt b/ext/standard/tests/file/chmod_error.phpt new file mode 100644 index 0000000..f4cae3b --- /dev/null +++ b/ext/standard/tests/file/chmod_error.phpt @@ -0,0 +1,47 @@ +--TEST-- +Test chmod() function : error conditions +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing chmod() : error conditions *** + +-- Testing chmod() function with more than expected no. of arguments -- + +Warning: chmod() expects exactly 2 parameters, 3 given in %s on line %d +NULL + +-- Testing chmod() function with less than expected no. of arguments -- + +Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d +NULL + +Warning: chmod(): No such file or directory in %s on line %d +bool(false) +===DONE=== diff --git a/ext/standard/tests/file/chmod_variation1.phpt b/ext/standard/tests/file/chmod_variation1.phpt new file mode 100644 index 0000000..f35e54e --- /dev/null +++ b/ext/standard/tests/file/chmod_variation1.phpt @@ -0,0 +1,34 @@ +--TEST-- +chmod() on a directory +--SKIPIF-- + +--FILE-- += 0; $perms_to_set--) { + chmod($dirname, $perms_to_set); + $set_perms = (fileperms($dirname) & PERMISSIONS_MASK); + clearstatcache(); + if ($set_perms != $perms_to_set) { + printf("Error: %o does not match %o\n", $set_perms, $perms_to_set); + } +} + +var_dump(chmod($dirname, 0777)); +rmdir($dirname); + +echo "done"; + +?> +--EXPECT-- +bool(true) +done diff --git a/ext/standard/tests/file/chmod_variation2-win32.phpt b/ext/standard/tests/file/chmod_variation2-win32.phpt new file mode 100644 index 0000000..bc379ff --- /dev/null +++ b/ext/standard/tests/file/chmod_variation2-win32.phpt @@ -0,0 +1,74 @@ +--TEST-- +chmod() with various paths +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +chmod() on a path containing .. and . +bool(true) +bool(true) +666 + +chmod() on a path containing .. with invalid directories +bool(true) +bool(true) +666 + +chmod() on a relative path from a different working directory +bool(true) +bool(true) +666 + +chmod() on a directory with a trailing / +bool(true) +bool(true) +666 diff --git a/ext/standard/tests/file/chmod_variation2.phpt b/ext/standard/tests/file/chmod_variation2.phpt new file mode 100644 index 0000000..b193acf --- /dev/null +++ b/ext/standard/tests/file/chmod_variation2.phpt @@ -0,0 +1,92 @@ +--TEST-- +chmod() with various paths +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +chmod() on a path containing .. and . +bool(true) +bool(true) +755 + +chmod() on a path containing .. with invalid directories +bool(true) + +Warning: chmod(): No such file or directory in %s on line %d +bool(false) +777 + +chmod() on a linked file +bool(true) +bool(true) +bool(true) +755 +bool(true) + +chmod() on a relative path from a different working directory +bool(true) +bool(true) +755 + +chmod() on a directory with a trailing / +bool(true) +bool(true) +755 diff --git a/ext/standard/tests/file/chmod_variation3.phpt b/ext/standard/tests/file/chmod_variation3.phpt new file mode 100644 index 0000000..7c637b8 --- /dev/null +++ b/ext/standard/tests/file/chmod_variation3.phpt @@ -0,0 +1,209 @@ +--TEST-- +Test chmod() function : first parameter variation +--FILE-- + 1, 'two' => 2); + +//array of values to iterate over +$inputs = array( + + // int data + 'int 0' => 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + + // float data + 'float 10.5' => 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + + // array data + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + + // null data + 'uppercase NULL' => NULL, + 'lowercase null' => null, + + // boolean data + 'lowercase true' => true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + + // empty data + 'empty string DQ' => "", + 'empty string SQ' => '', + + // object data + 'instance of classWithToString' => new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + + // undefined data + 'undefined var' => @$undefined_var, + + // unset data + 'unset var' => @$unset_var, +); + +// loop through each element of the array for filename + +foreach($inputs as $key =>$value) { + echo "\n--$key--\n"; + var_dump( chmod($value, $mode) ); +}; + +?> +===DONE=== +--EXPECTF-- +*** Testing chmod() : usage variation *** + +--int 0-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--int 1-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--int 12345-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--int -12345-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--float 10.5-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--float -10.5-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--float 12.3456789000e10-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--float -12.3456789000e10-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--float .5-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--empty array-- +Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) +NULL + +--int indexed array-- +Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) +NULL + +--associative array-- +Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) +NULL + +--nested arrays-- +Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) +NULL + +--uppercase NULL-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) + +--lowercase null-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) + +--lowercase true-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--lowercase false-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) + +--uppercase TRUE-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--uppercase FALSE-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) + +--empty string DQ-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) + +--empty string SQ-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) + +--instance of classWithToString-- +Error: 2 - chmod(): No such file or directory, %s(%d) +bool(false) + +--instance of classWithoutToString-- +Error: 2 - chmod() expects parameter 1 to be a valid path, object given, %s(%d) +NULL + +--undefined var-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) + +--unset var-- +Error: 2 - chmod(): %s, %s(%d) +bool(false) +===DONE=== + diff --git a/ext/standard/tests/file/chmod_variation4.phpt b/ext/standard/tests/file/chmod_variation4.phpt new file mode 100644 index 0000000..15310f1 --- /dev/null +++ b/ext/standard/tests/file/chmod_variation4.phpt @@ -0,0 +1,201 @@ +--TEST-- +Test chmod() function : second parameter variation +--FILE-- + 1, 'two' => 2); + +//array of values to iterate over +$inputs = array( + + // float data + 'float 10.5' => 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + + // array data + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + + // null data + 'uppercase NULL' => NULL, + 'lowercase null' => null, + + // boolean data + 'lowercase true' => true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + + // empty data + 'empty string DQ' => "", + 'empty string SQ' => '', + + // string data + 'string DQ' => "string", + 'string SQ' => 'string', + 'mixed case string' => "sTrInG", + 'heredoc' => $heredoc, + + // object data + 'instance of classWithToString' => new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + + // undefined data + 'undefined var' => @$undefined_var, + + // unset data + 'unset var' => @$unset_var, +); + +// loop through each element of the array for mode + +foreach($inputs as $key =>$value) { + echo "\n--$key--\n"; + var_dump( chmod($filename, $value) ); +}; + +chmod($filename, 0777); +unlink($filename); + +?> +===DONE=== +--EXPECTF-- +*** Testing chmod() : usage variation *** + +--float 10.5-- +bool(true) + +--float -10.5-- +bool(true) + +--float 12.3456789000e10-- +bool(true) + +--float -12.3456789000e10-- +bool(true) + +--float .5-- +bool(true) + +--empty array-- +Error: 2 - chmod() expects parameter 2 to be long, array given, %s(%d) +NULL + +--int indexed array-- +Error: 2 - chmod() expects parameter 2 to be long, array given, %s(%d) +NULL + +--associative array-- +Error: 2 - chmod() expects parameter 2 to be long, array given, %s(%d) +NULL + +--nested arrays-- +Error: 2 - chmod() expects parameter 2 to be long, array given, %s(%d) +NULL + +--uppercase NULL-- +bool(true) + +--lowercase null-- +bool(true) + +--lowercase true-- +bool(true) + +--lowercase false-- +bool(true) + +--uppercase TRUE-- +bool(true) + +--uppercase FALSE-- +bool(true) + +--empty string DQ-- +Error: 2 - chmod() expects parameter 2 to be long, string given, %s(%d) +NULL + +--empty string SQ-- +Error: 2 - chmod() expects parameter 2 to be long, string given, %s(%d) +NULL + +--string DQ-- +Error: 2 - chmod() expects parameter 2 to be long, string given, %s(%d) +NULL + +--string SQ-- +Error: 2 - chmod() expects parameter 2 to be long, string given, %s(%d) +NULL + +--mixed case string-- +Error: 2 - chmod() expects parameter 2 to be long, string given, %s(%d) +NULL + +--heredoc-- +Error: 2 - chmod() expects parameter 2 to be long, string given, %s(%d) +NULL + +--instance of classWithToString-- +Error: 2 - chmod() expects parameter 2 to be long, object given, %s(%d) +NULL + +--instance of classWithoutToString-- +Error: 2 - chmod() expects parameter 2 to be long, object given, %s(%d) +NULL + +--undefined var-- +bool(true) + +--unset var-- +bool(true) +===DONE=== + diff --git a/ext/standard/tests/file/chown.phpt b/ext/standard/tests/file/chown.phpt new file mode 100644 index 0000000..9075d3d --- /dev/null +++ b/ext/standard/tests/file/chown.phpt @@ -0,0 +1,15 @@ +--TEST-- +chown() with NULL as user name +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: chown(): parameter 2 should be string or integer, null given in %schown.php on line %d +ALIVE diff --git a/ext/standard/tests/file/chroot_001.phpt b/ext/standard/tests/file/chroot_001.phpt new file mode 100644 index 0000000..daa1a83 --- /dev/null +++ b/ext/standard/tests/file/chroot_001.phpt @@ -0,0 +1,30 @@ +--TEST-- +chroot() +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +bool(true) +bool(true) +bool(false) +%unicode|string%(1) "/" diff --git a/ext/standard/tests/file/clearstatcache_001.phpt b/ext/standard/tests/file/clearstatcache_001.phpt new file mode 100644 index 0000000..4282430 --- /dev/null +++ b/ext/standard/tests/file/clearstatcache_001.phpt @@ -0,0 +1,43 @@ +--TEST-- +clearstatcache() optional parameters +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +%unicode|string%(%d) "%s_dir1" +%unicode|string%(%d) "%s_dir1" +%unicode|string%(%d) "%s_dir1" +%unicode|string%(%d) "%s_dir1" +bool(false) diff --git a/ext/standard/tests/file/clearstatcache_error.phpt b/ext/standard/tests/file/clearstatcache_error.phpt new file mode 100644 index 0000000..ee7d1af --- /dev/null +++ b/ext/standard/tests/file/clearstatcache_error.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test clearstatcache() function: error conditions +--FILE-- + +--EXPECTF-- +*** Testing clearstatcache() function: error conditions *** + +Warning: clearstatcache() expects at most 2 parameters, 3 given in %s on line %d +NULL +*** Done *** diff --git a/ext/standard/tests/file/copy_basic.phpt b/ext/standard/tests/file/copy_basic.phpt new file mode 100644 index 0000000..32788f9 --- /dev/null +++ b/ext/standard/tests/file/copy_basic.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test copy() function: basic functionality +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Testing copy() function: to copy file from source to destination -- +bool(true) +bool(true) +bool(true) +-- Checking whether the copy of file exists -- +bool(true) +bool(true) +-- Checking filepermissions of file and its copies -- +%d +%d +%d +*** Done *** + diff --git a/ext/standard/tests/file/copy_error.phpt b/ext/standard/tests/file/copy_error.phpt new file mode 100644 index 0000000..96072eb --- /dev/null +++ b/ext/standard/tests/file/copy_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test copy() function: error conditions +--FILE-- + + +--EXPECTF-- +*** Testing copy() function: error conditions -- + +Warning: copy(/no/file): failed to open stream: No such file or directory in %s on line %d +bool(false) + +Warning: copy() expects at least 2 parameters, 0 given in %s on line %d +NULL + +Warning: copy() expects at least 2 parameters, 1 given in %s on line %d +NULL + +Warning: copy() expects parameter 3 to be resource, string given in %s on line %d +NULL +*** Done *** + diff --git a/ext/standard/tests/file/copy_variation1.phpt b/ext/standard/tests/file/copy_variation1.phpt new file mode 100644 index 0000000..4d0a973 --- /dev/null +++ b/ext/standard/tests/file/copy_variation1.phpt @@ -0,0 +1,145 @@ +--TEST-- +Test copy() function: usage variations - destination file names(numerics/strings) +--FILE-- + "; +var_dump( filesize("$src_file_name") ); +clearstatcache(); + +echo "\n-- Now applying copy() on source file to create copies --"; +$count = 1; +foreach($dest_files as $dest_file) { + echo "\n-- Iteration $count --\n"; + + $dest_file_name = "$file_path/$dest_file"; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest_file_name) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest_file_name) ); + + echo "Destination file name => "; + print($dest_file_name); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest_file_name) ); + clearstatcache(); + + unlink($dest_file_name); + + $count++; +} + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: destination file names containing numerics/strings *** +Size of the source file before copy operation => int(1500) + +-- Now applying copy() on source file to create copies -- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/copy.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/copy_copy_variation1.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 4 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/123.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 5 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/copy_variation1.123 +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 6 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/123 +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 7 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/123copy_variation1.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 8 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/copy_variation.tmp123 +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 9 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/copy1.tmp +Size of source file => int(1500) +Size of destination file => int(1500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation10.phpt b/ext/standard/tests/file/copy_variation10.phpt new file mode 100644 index 0000000..98494af --- /dev/null +++ b/ext/standard/tests/file/copy_variation10.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test copy() function: usage variations - identical names +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Test copy(): Trying to create a copy of file with the same source name *** +bool(false) +bool(true) +int(1500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation11.phpt b/ext/standard/tests/file/copy_variation11.phpt new file mode 100644 index 0000000..adee8e1 --- /dev/null +++ b/ext/standard/tests/file/copy_variation11.phpt @@ -0,0 +1,71 @@ +--TEST-- +Test copy() function: usage variations - existing dir as destination +--FILE-- + "; +var_dump( filesize($file) ); //size of source before copy +clearstatcache(); +echo "Size of destination before copy operation => "; +var_dump( filesize($dir) ); //size of destination before copy +clearstatcache(); + +echo "\n-- Now applying copy() operation --\n"; +var_dump( copy($file, $dir) ); //expected: bool(false) + +var_dump( file_exists($file) ); //expected: bool(true) +var_dump( file_exists($dir) ); //expected: bool(true) + +var_dump( is_file($file) ); //expected: bool(true) +var_dump( is_dir($file) ); //expected: bool(false) + +var_dump( is_file($dir) ); //expected: bool(false) +var_dump( is_dir($dir) ); //expected: bool(true) + +var_dump( filesize($file) ); //size of source after copy +var_dump( filesize($dir) ); //size of destination after copy + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: Trying to create a copy of source file as a dir *** +Size of source before copy operation => int(300) +Size of destination before copy operation => int(%d) + +-- Now applying copy() operation -- + +Warning: %s +bool(false) +bool(true) +bool(true) +bool(true) +bool(false) +bool(false) +bool(true) +int(300) +int(%d) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation12-win32.phpt b/ext/standard/tests/file/copy_variation12-win32.phpt new file mode 100644 index 0000000..4d39de3 --- /dev/null +++ b/ext/standard/tests/file/copy_variation12-win32.phpt @@ -0,0 +1,47 @@ +--TEST-- +Test copy() function: usage variations - dir as source +--SKIPIF-- + +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: Trying to create a copy of an existing dir *** + +Warning: copy(): The first argument to copy() function cannot be a directory in %s on line %d +bool(false) +bool(false) +int(0) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation12.phpt b/ext/standard/tests/file/copy_variation12.phpt new file mode 100644 index 0000000..7f96fd0 --- /dev/null +++ b/ext/standard/tests/file/copy_variation12.phpt @@ -0,0 +1,51 @@ +--TEST-- +Test copy() function: usage variations - dir as source (Bug #42111) +--SKIPIF-- + + +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: Trying to create a copy of an existing dir *** + +Warning: copy(): The first argument to copy() function cannot be a directory in %scopy_variation12.php on line %d +bool(false) +bool(false) +int(%d) + +Warning: filesize(): stat failed for %scopy_copy_variation12 in %scopy_variation12.php on line %d +bool(false) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation13.phpt b/ext/standard/tests/file/copy_variation13.phpt new file mode 100644 index 0000000..779f82b --- /dev/null +++ b/ext/standard/tests/file/copy_variation13.phpt @@ -0,0 +1,57 @@ +--TEST-- +Test copy() function: usage variations - src as dir and dest as an existing file(Bug #42243) +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: Trying to copy dir to file *** +*** Testing copy() in copying dir to file *** + +Warning: copy(): The first argument to copy() function cannot be a directory in %scopy_variation13.php on line %d +bool(false) +bool(true) +bool(true) +bool(false) +bool(true) +bool(true) +bool(false) +int(%d) +int(%d) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation14.phpt b/ext/standard/tests/file/copy_variation14.phpt new file mode 100644 index 0000000..1a39c1c --- /dev/null +++ b/ext/standard/tests/file/copy_variation14.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test copy() function: usage variations - non existing src/dest +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: Trying to create a copy of non-existing source in existing destination *** +Warning: copy(%s): %s +bool(false) +bool(false) + +*** Test copy() function: Trying to create copy of an existing source in non-existing destination *** +Warning: copy(%s): %s +bool(false) +bool(false) +int(1500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation15.phpt b/ext/standard/tests/file/copy_variation15.phpt new file mode 100644 index 0000000..fbf5e7b --- /dev/null +++ b/ext/standard/tests/file/copy_variation15.phpt @@ -0,0 +1,64 @@ +--TEST-- +Test copy() function: usage variations - destination dir access perms +--SKIPIF-- + +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: Trying to create a copy of file in a dir which doesn't have write permissions *** +Warning: copy(%s): %s +bool(false) +bool(false) +int(300) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation16-win32.phpt b/ext/standard/tests/file/copy_variation16-win32.phpt new file mode 100644 index 0000000..7688f5e --- /dev/null +++ b/ext/standard/tests/file/copy_variation16-win32.phpt @@ -0,0 +1,144 @@ +--TEST-- +Test copy() function: usage variations - copy data file across dirs +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize($src_file_name) ); +clearstatcache(); + +$dests = array( + $base_dir."/copy_copy_variation16.tmp", + $base_dir."/copy_variation16_sub/copy_copy_variation16.tmp", + "$sub_dir/copy_copy_variation16.tmp", + "$sub_dir/../copy_copy_variation16.tmp", + "$sub_dir/../copy_variation16_sub/copy_copy_variation16.tmp", + "$sub_dir/..///../copy_copy_variation16.tmp", + "$sub_dir/..///../*", + "$dirname_with_blank/copy_copy_variation16.tmp" +); + +echo "\n--- Now applying copy() on source file to create copies ---"; +$count = 1; +foreach($dests as $dest) { + echo "\n-- Iteration $count --\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest) ); + + if( file_exists($dest) ){ + echo "Destination file name is => "; + print($dest); + echo "\n"; + + echo "Size of destination file => "; + var_dump( filesize($dest) ); + clearstatcache(); + + unlink("$dest"); + } + $count++; +} + +unlink($src_file_name); +rmdir($dirname_with_blank); +rmdir($sub_dir); +rmdir($base_dir); + +echo "*** Done ***\n"; +?> + +--EXPECTF-- +*** Testing copy() function: copying data file across directories *** +- Size of source file => int(3500) + +--- Now applying copy() on source file to create copies --- +-- Iteration 1 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 2 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 3 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 4 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/../copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 5 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/../copy_variation16_sub/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 6 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/..///../copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 7 -- +Size of source file => int(3500) +Copy operation => +Warning: copy(%s): failed to open stream: No such file or directory in %s on line %s +bool(false) +Existence of destination file => bool(false) + +-- Iteration 8 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/copy variation6/copy_copy_variation16.tmp +Size of destination file => int(3500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation16.phpt b/ext/standard/tests/file/copy_variation16.phpt new file mode 100644 index 0000000..9ad834b --- /dev/null +++ b/ext/standard/tests/file/copy_variation16.phpt @@ -0,0 +1,143 @@ +--TEST-- +Test copy() function: usage variations - copy data file across dirs +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize($src_file_name) ); +clearstatcache(); + +$dests = array( + $base_dir."/copy_copy_variation16.tmp", + $base_dir."/copy_variation16_sub/copy_copy_variation16.tmp", + "$sub_dir/copy_copy_variation16.tmp", + "$sub_dir/../copy_copy_variation16.tmp", + "$sub_dir/../copy_variation16_sub/copy_copy_variation16.tmp", + "$sub_dir/..///../copy_copy_variation16.tmp", + "$sub_dir/..///../*", + "$dirname_with_blank/copy_copy_variation16.tmp" +); + +echo "\n--- Now applying copy() on source file to create copies ---"; +$count = 1; +foreach($dests as $dest) { + echo "\n-- Iteration $count --\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest) ); + + echo "Destination file name is => "; + print($dest); + echo "\n"; + + echo "Size of destination file => "; + var_dump( filesize($dest) ); + clearstatcache(); + + unlink("$dest"); + + $count++; +} + +unlink($src_file_name); +rmdir($dirname_with_blank); +rmdir($sub_dir); +rmdir($base_dir); + +echo "*** Done ***\n"; +?> + +--EXPECTF-- +*** Testing copy() function: copying data file across directories *** +- Size of source file => int(3500) + +--- Now applying copy() on source file to create copies --- +-- Iteration 1 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 2 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 3 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 4 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/../copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 5 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/../copy_variation16_sub/copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 6 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/..///../copy_copy_variation16.tmp +Size of destination file => int(3500) + +-- Iteration 7 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/..///../* +Size of destination file => int(3500) + +-- Iteration 8 -- +Size of source file => int(3500) +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation16/copy_variation16_sub/copy variation6/copy_copy_variation16.tmp +Size of destination file => int(3500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation17.phpt b/ext/standard/tests/file/copy_variation17.phpt new file mode 100644 index 0000000..97f1665 --- /dev/null +++ b/ext/standard/tests/file/copy_variation17.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test copy() function: usage variations - wildcard chars in source +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: With source file names containing wild-card chars *** +bool(true) +bool(true) +int(1500) + +Warning: copy(%s): %s +bool(false) +bool(false) + +Warning: copy(%s): %s +bool(false) +bool(false) + +Warning: copy(%s): %s +bool(false) +bool(false) + +Warning: copy(%s): %s +bool(false) +bool(false) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation18.phpt b/ext/standard/tests/file/copy_variation18.phpt new file mode 100644 index 0000000..53467af --- /dev/null +++ b/ext/standard/tests/file/copy_variation18.phpt @@ -0,0 +1,56 @@ +--TEST-- +Test copy() function: usage variations - stat after copy +--FILE-- + "; +var_dump( copy($src_file_name, $dest_file_name) ); + +$stat_after_copy = stat($src_file_name); +clearstatcache(); + +// compare all stat fields except access time +$stat_keys_to_compare = array("dev", "ino", "mode", "nlink", "uid", "gid", + "rdev", "size", "mtime", "ctime", + "blksize", "blocks"); + +echo "Comparing the stats of file before and after copy operation => "; +var_dump( compare_stats($stat_before_copy, $stat_after_copy, $stat_keys_to_compare) ); + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: stat of file before and after copy *** +Copy operation => bool(true) +Comparing the stats of file before and after copy operation => bool(true) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation2-win32.phpt b/ext/standard/tests/file/copy_variation2-win32.phpt new file mode 100644 index 0000000..4819d63 --- /dev/null +++ b/ext/standard/tests/file/copy_variation2-win32.phpt @@ -0,0 +1,218 @@ +--TEST-- +Test copy() function: usage variations - destination file names(special chars) +--SKIPIF-- + +--FILE-- +copy_variation2.tmp", + "!copy_variation2.tmp", + "©_variation2.tmp", + "(copy_variation2.tmp", + ":copy_variation2.tmp", + ";copy_variation2.tmp", + "=copy_variation2.tmp", + "[copy_variation2.tmp", + "^copy_variation2.tmp", + "{copy_variation2.tmp", + "|copy_variation2.tmp", + "~copy_variation2.tmp", + "\$copy_variation2.tmp" +); + +echo "Size of the source file before copy operation => "; +var_dump( filesize("$src_file_name") ); +clearstatcache(); + +echo "\n--- Now applying copy() on source file to create copies ---"; +$count = 1; +foreach($dest_files as $dest_file) { + echo "\n-- Iteration $count --\n"; + $dest_file_name = $file_path."/$dest_file"; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest_file_name) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest_file_name) ); + + if( file_exists($dest_file_name) ) { + echo "Destination file name => "; + print($dest_file_name); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest_file_name) ); + clearstatcache(); + + unlink($dest_file_name); + } + $count++; +} + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: destination file names containing special characters *** +Size of the source file before copy operation => int(1500) + +--- Now applying copy() on source file to create copies --- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/_copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/@copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/#copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 4 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/+copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 5 -- +Copy operation => +Warning: copy(%s): %s +bool(false) +Existence of destination file => bool(false) + +-- Iteration 6 -- +Copy operation => +Warning: copy(%s): %s +bool(false) +Existence of destination file => bool(false) + +-- Iteration 7 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/!copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 8 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/©_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 9 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/(copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 10 -- +Copy operation => +Warning: copy(%s): %s +bool(false) +Existence of destination file => bool(false) + +-- Iteration 11 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/;copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 12 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/=copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 13 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/[copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 14 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/^copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 15 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/{copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 16 -- +Copy operation => +Warning: copy(%s): %s +bool(false) +Existence of destination file => bool(false) + +-- Iteration 17 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/~copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 18 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/$copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation2.phpt b/ext/standard/tests/file/copy_variation2.phpt new file mode 100644 index 0000000..d99f5a8 --- /dev/null +++ b/ext/standard/tests/file/copy_variation2.phpt @@ -0,0 +1,237 @@ +--TEST-- +Test copy() function: usage variations - destination file names(special chars) +--SKIPIF-- + +--FILE-- +copy_variation2.tmp", + "!copy_variation2.tmp", + "©_variation2.tmp", + "(copy_variation2.tmp", + ":copy_variation2.tmp", + ";copy_variation2.tmp", + "=copy_variation2.tmp", + "[copy_variation2.tmp", + "^copy_variation2.tmp", + "{copy_variation2.tmp", + "|copy_variation2.tmp", + "~copy_variation2.tmp", + "\$copy_variation2.tmp" +); + +echo "Size of the source file before copy operation => "; +var_dump( filesize("$src_file_name") ); +clearstatcache(); + +echo "\n--- Now applying copy() on source file to create copies ---"; +$count = 1; +foreach($dest_files as $dest_file) { + echo "\n-- Iteration $count --\n"; + $dest_file_name = $file_path."/$dest_file"; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest_file_name) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest_file_name) ); + + echo "Destination file name => "; + print($dest_file_name); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest_file_name) ); + clearstatcache(); + + unlink($dest_file_name); + + $count++; +} + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: destination file names containing special characters *** +Size of the source file before copy operation => int(1500) + +--- Now applying copy() on source file to create copies --- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/_copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/@copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/#copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 4 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/+copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 5 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/*copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 6 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/?copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 7 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/ int(1500) +Size of destination file => int(1500) + +-- Iteration 8 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/>copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 9 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/!copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 10 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/©_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 11 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/(copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 12 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/:copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 13 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/;copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 14 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/=copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 15 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/[copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 16 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/^copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 17 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/{copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 18 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/|copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 19 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/~copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 20 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/$copy_variation2.tmp +Size of source file => int(1500) +Size of destination file => int(1500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation3-win32.phpt b/ext/standard/tests/file/copy_variation3-win32.phpt new file mode 100644 index 0000000..68ce4a1 --- /dev/null +++ b/ext/standard/tests/file/copy_variation3-win32.phpt @@ -0,0 +1,109 @@ +--TEST-- +Test copy() function: usage variations - destination file names(white spaces) +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize("$src_file_name") ); +clearstatcache(); + +echo "\n-- Now applying copy() on source file to create copies --"; +$count = 1; +foreach($dest_files as $dest_file) { + + echo "\n-- Iteration $count --\n"; + $dest_file_name = $dest_file; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest_file_name) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest_file_name) ); + + if( file_exists($dest_file_name) ) { + echo "Destination file name => "; + print($dest_file_name); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest_file_name) ); + clearstatcache(); + + unlink($dest_file_name); + } + $count++; +} + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: destination file names containing whitespaces *** +Size of the source file before copy operation => int(1500) + +-- Now applying copy() on source file to create copies -- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => copy variation3.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => copy_variation3.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 3 -- +Copy operation => +Warning: copy(%s): %s +bool(false) +Existence of destination file => bool(false) + +-- Iteration 4 -- +Copy operation => +Warning: copy(%s): %s +bool(false) +Existence of destination file => bool(false) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation3.phpt b/ext/standard/tests/file/copy_variation3.phpt new file mode 100644 index 0000000..1c45c8c --- /dev/null +++ b/ext/standard/tests/file/copy_variation3.phpt @@ -0,0 +1,110 @@ +--TEST-- +Test copy() function: usage variations - destination file names(white spaces) +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize("$src_file_name") ); +clearstatcache(); + +echo "\n-- Now applying copy() on source file to create copies --"; +$count = 1; +foreach($dest_files as $dest_file) { + + echo "\n-- Iteration $count --\n"; + $dest_file_name = $dest_file; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest_file_name) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest_file_name) ); + + echo "Destination file name => "; + print($dest_file_name); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest_file_name) ); + clearstatcache(); + + unlink($dest_file_name); + + $count++; +} + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: destination file names containing whitespaces *** +Size of the source file before copy operation => int(1500) + +-- Now applying copy() on source file to create copies -- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => copy variation3.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => copy_variation3.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => copy variation3.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 4 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => +Size of source file => int(1500) +Size of destination file => int(1500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt new file mode 100644 index 0000000..3c8224d Binary files /dev/null and b/ext/standard/tests/file/copy_variation4.phpt differ diff --git a/ext/standard/tests/file/copy_variation5-win32.phpt b/ext/standard/tests/file/copy_variation5-win32.phpt new file mode 100644 index 0000000..baf7be4 --- /dev/null +++ b/ext/standard/tests/file/copy_variation5-win32.phpt @@ -0,0 +1,111 @@ +--TEST-- +Test copy() function: usage variations - destination file names(case sensitive) +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize($src_file_name) ); +clearstatcache(); + +echo "\n-- Now applying copy() on source file to create copies --"; +$count = 1; +foreach($dest_files as $dest_file) { + + echo "\n-- Iteration $count --\n"; + $dest_file_name = $file_path."/$dest_file"; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest_file_name) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest_file_name) ); + + echo "Destination file name => "; + print($dest_file_name); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest_file_name) ); + clearstatcache(); + + $count++; +} + + +$count = 1; +foreach($dest_files as $dest_file) { + unlink($file_path."/".$dest_file); + $count++; +} + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: checking case sensitivity in creation of destination file names *** +Size of the source file before copy operation => int(1500) + +-- Now applying copy() on source file to create copies -- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/COPY.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/COPY.TMP +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/CopY.TMP +Size of source file => int(1500) +Size of destination file => int(1500) + +Warning: unlink(%s/COPY.TMP): No such file or directory in %s on line %d + +Warning: unlink(%s/CopY.TMP): No such file or directory in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/copy_variation5.phpt b/ext/standard/tests/file/copy_variation5.phpt new file mode 100644 index 0000000..8abc9c9 --- /dev/null +++ b/ext/standard/tests/file/copy_variation5.phpt @@ -0,0 +1,106 @@ +--TEST-- +Test copy() function: usage variations - destination file names(case sensitive) +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize($src_file_name) ); +clearstatcache(); + +echo "\n-- Now applying copy() on source file to create copies --"; +$count = 1; +foreach($dest_files as $dest_file) { + + echo "\n-- Iteration $count --\n"; + $dest_file_name = $file_path."/$dest_file"; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest_file_name) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest_file_name) ); + + echo "Destination file name => "; + print($dest_file_name); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest_file_name) ); + clearstatcache(); + + $count++; +} + +$count = 1; +foreach($dest_files as $dest_file) { + unlink($file_path."/".$dest_file); + $count++; +} + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Test copy() function: checking case sensitivity in creation of destination file names *** +Size of the source file before copy operation => int(1500) + +-- Now applying copy() on source file to create copies -- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/COPY.tmp +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/COPY.TMP +Size of source file => int(1500) +Size of destination file => int(1500) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name => %s/CopY.TMP +Size of source file => int(1500) +Size of destination file => int(1500) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation6-win32.phpt b/ext/standard/tests/file/copy_variation6-win32.phpt new file mode 100644 index 0000000..524b21d --- /dev/null +++ b/ext/standard/tests/file/copy_variation6-win32.phpt @@ -0,0 +1,143 @@ +--TEST-- +Test copy() function: usage variations - copy empty file across dirs +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize($src_file_name) ); +clearstatcache(); + +$dests = array( + $base_dir."/copy_copy_variation6.tmp", + $base_dir."/copy_variation6_sub/copy_copy_variation6.tmp", + "$sub_dir/copy_copy_variation6.tmp", + "$sub_dir/../copy_copy_variation6.tmp", + "$sub_dir/../copy_variation6_sub/copy_copy_variation6.tmp", + "$sub_dir/..///../copy_copy_variation6.tmp", + "$sub_dir/..///../*", + "$dirname_with_blank/copy_copy_variation6.tmp" +); + +echo "\n-- Now applying copy() on source file to create copies --"; +$count = 1; +foreach($dests as $dest) { + echo "\n-- Iteration $count --\n"; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest) ); + + if( file_exists($dest) ) { + echo "Destination file name is => "; + print($dest); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest) ); + clearstatcache(); + + unlink("$dest"); + } + + $count++; +} + +unlink($src_file_name); +rmdir($dirname_with_blank); +rmdir($sub_dir); +rmdir($base_dir); + +echo "*** Done ***\n"; +?> + +--EXPECTF-- +*** Test copy() function: copying file across directories *** +Size of source file => int(0) + +-- Now applying copy() on source file to create copies -- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 4 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/../copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 5 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/../copy_variation6_sub/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 6 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/..///../copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 7 -- +Copy operation => +Warning: copy(%s/copy_variation6/copy_variation6_sub/..///../*): failed to open stream: No such file or directory in %s on line %d +bool(false) +Existence of destination file => bool(false) + +-- Iteration 8 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/copy variation6/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation6.phpt b/ext/standard/tests/file/copy_variation6.phpt new file mode 100644 index 0000000..3213c6b --- /dev/null +++ b/ext/standard/tests/file/copy_variation6.phpt @@ -0,0 +1,142 @@ +--TEST-- +Test copy() function: usage variations - copy empty file across dirs +--SKIPIF-- + +--FILE-- + "; +var_dump( filesize($src_file_name) ); +clearstatcache(); + +$dests = array( + $base_dir."/copy_copy_variation6.tmp", + $base_dir."/copy_variation6_sub/copy_copy_variation6.tmp", + "$sub_dir/copy_copy_variation6.tmp", + "$sub_dir/../copy_copy_variation6.tmp", + "$sub_dir/../copy_variation6_sub/copy_copy_variation6.tmp", + "$sub_dir/..///../copy_copy_variation6.tmp", + "$sub_dir/..///../*", + "$dirname_with_blank/copy_copy_variation6.tmp" +); + +echo "\n-- Now applying copy() on source file to create copies --"; +$count = 1; +foreach($dests as $dest) { + echo "\n-- Iteration $count --\n"; + + echo "Copy operation => "; + var_dump( copy($src_file_name, $dest) ); + + echo "Existence of destination file => "; + var_dump( file_exists($dest) ); + + echo "Destination file name is => "; + print($dest); + echo "\n"; + + echo "Size of source file => "; + var_dump( filesize($src_file_name) ); + clearstatcache(); + + echo "Size of destination file => "; + var_dump( filesize($dest) ); + clearstatcache(); + + unlink("$dest"); + + $count++; +} + +unlink($src_file_name); +rmdir($dirname_with_blank); +rmdir($sub_dir); +rmdir($base_dir); + +echo "*** Done ***\n"; +?> + +--EXPECTF-- +*** Test copy() function: copying file across directories *** +Size of source file => int(0) + +-- Now applying copy() on source file to create copies -- +-- Iteration 1 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 2 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 3 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 4 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/../copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 5 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/../copy_variation6_sub/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 6 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/..///../copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 7 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/..///../* +Size of source file => int(0) +Size of destination file => int(0) + +-- Iteration 8 -- +Copy operation => bool(true) +Existence of destination file => bool(true) +Destination file name is => %s/copy_variation6/copy_variation6_sub/copy variation6/copy_copy_variation6.tmp +Size of source file => int(0) +Size of destination file => int(0) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation7.phpt b/ext/standard/tests/file/copy_variation7.phpt new file mode 100644 index 0000000..d687b07 --- /dev/null +++ b/ext/standard/tests/file/copy_variation7.phpt @@ -0,0 +1,86 @@ +--TEST-- +Test copy() function: usage variations - links +--SKIPIF-- + + +--FILE-- + \n"; +var_dump( filesize($file_path."/copy_variation7_symlink.tmp") ); //size of the symlink itself +clearstatcache(); +var_dump( filesize($file_path."/copy_variation7_hardlink.tmp") ); //size of the file +clearstatcache(); + +echo "-- Now applying copy() on source link to create copies --\n"; +echo "-- With symlink --\n"; +var_dump( copy($symlink, $file_path."/copy_copy_variation7_symlink.tmp") ); +var_dump( file_exists($file_path."/copy_copy_variation7_symlink.tmp") ); +var_dump( is_link($file_path."/copy_copy_variation7_symlink.tmp") ); +var_dump( is_file($file_path."/copy_copy_variation7_symlink.tmp") ); +var_dump( filesize($file_path."/copy_copy_variation7_symlink.tmp") ); +clearstatcache(); + +echo "-- With hardlink --\n"; +var_dump( copy($hardlink, $file_path."/copy_copy_variation7_hardlink.tmp") ); +var_dump( file_exists($file_path."/copy_copy_variation7_hardlink.tmp") ); +var_dump( is_link($file_path."/copy_copy_variation7_hardlink.tmp") ); +var_dump( is_file($file_path."/copy_copy_variation7_hardlink.tmp") ); +var_dump( filesize($file_path."/copy_copy_variation7_hardlink.tmp") ); +clearstatcache(); + +echo "*** Done ***\n"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Testing copy() with symlink and hardlink *** +Size of source files => +int(%d) +int(3600) +-- Now applying copy() on source link to create copies -- +-- With symlink -- +bool(true) +bool(true) +bool(false) +bool(true) +int(3600) +-- With hardlink -- +bool(true) +bool(true) +bool(false) +bool(true) +int(3600) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation8.phpt b/ext/standard/tests/file/copy_variation8.phpt new file mode 100644 index 0000000..63f57f3 --- /dev/null +++ b/ext/standard/tests/file/copy_variation8.phpt @@ -0,0 +1,176 @@ +--TEST-- +Test copy() function: usage variations - copying links across dirs +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing copy() function: copying links across different directories *** + +-- Iteration 1 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) + +-- Iteration 2 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) + +-- Iteration 3 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) + +-- Iteration 4 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) + +-- Iteration 5 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) + +-- Iteration 6 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) + +-- Iteration 7 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) + +-- Iteration 8 -- +- With symlink - +bool(true) +bool(true) +bool(false) +bool(true) +- With hardlink - +bool(true) +bool(true) +bool(false) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/copy_variation9.phpt b/ext/standard/tests/file/copy_variation9.phpt new file mode 100644 index 0000000..824bed0 --- /dev/null +++ b/ext/standard/tests/file/copy_variation9.phpt @@ -0,0 +1,75 @@ +--TEST-- +Test copy() function: usage variations - destination file access perms +--SKIPIF-- + +--FILE-- + + +--CLEAN-- + +--EXPECTF-- +*** Test copy() function: destination with/without write permissions *** + +-- With write permissions -- +bool(true) +bool(true) +bool(true) +int(1500) + +-- Without write permissions -- +bool(true) + +Warning: %s +bool(false) +bool(true) +int(1500) +*** Done *** diff --git a/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt new file mode 100644 index 0000000..87f8523 --- /dev/null +++ b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt @@ -0,0 +1,13 @@ +--TEST-- +Test function fstat() on directory wrapper +--FILE-- + +===DONE=== +--EXPECT-- +bool(false) +===DONE=== \ No newline at end of file diff --git a/ext/standard/tests/file/dirname_basic-win32.phpt b/ext/standard/tests/file/dirname_basic-win32.phpt new file mode 100644 index 0000000..61a6e33 --- /dev/null +++ b/ext/standard/tests/file/dirname_basic-win32.phpt @@ -0,0 +1,93 @@ +--TEST-- +Test dirname() function : basic functionality +--CREDITS-- +Dave Kelsey +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing dirname() : basic functionality *** +string(0) "" +string(1) "." +string(2) "c:" +string(3) "c:\" +string(3) "c:\" +string(1) "." +string(7) "c:\test" +string(7) "c:\test" +string(8) "c://test" +string(7) "c:\test" +string(15) "/usr/lib/locale" +string(17) "//usr/lib//locale" +string(1) "\" +string(1) "\" +string(1) "\" +string(1) "\" +string(1) "\" +string(15) "/usr/lib/locale" +string(31) "c:\windows/system32\drivers/etc" +string(15) "/usr\lib/locale" +string(15) " c:\test\adir" +string(12) "c:\test\adir" +string(15) " c:\test\adir" +string(18) " /usr/lib/locale" +string(15) "/usr/lib/locale" +string(18) " /usr/lib/locale" +string(1) "." +string(14) " c:\test\adir" +string(1) "\" +string(1) "\" +===DONE=== diff --git a/ext/standard/tests/file/dirname_basic.phpt b/ext/standard/tests/file/dirname_basic.phpt new file mode 100644 index 0000000..8f1944e --- /dev/null +++ b/ext/standard/tests/file/dirname_basic.phpt @@ -0,0 +1,94 @@ +--TEST-- +Test dirname() function : basic functionality +--CREDITS-- +Dave Kelsey +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing dirname() : basic functionality *** +string(0) "" +string(1) "." +string(1) "." +string(1) "." +string(1) "." +string(1) "." +string(1) "." +string(1) "." +string(8) "c://test" +string(1) "." +string(15) "/usr/lib/locale" +string(17) "//usr/lib//locale" +string(1) "." +string(1) "." +string(1) "/" +string(1) "/" +string(1) "/" +string(15) "/usr/lib/locale" +string(27) "c:\windows/system32\drivers" +string(8) "/usr\lib" +string(1) "." +string(1) "." +string(1) "." +string(18) " /usr/lib/locale" +string(15) "/usr/lib/locale" +string(18) " /usr/lib/locale" +string(1) "." +string(1) "." +string(1) "/" +string(1) "/" +===DONE=== + diff --git a/ext/standard/tests/file/dirname_error.phpt b/ext/standard/tests/file/dirname_error.phpt new file mode 100644 index 0000000..dc7814f --- /dev/null +++ b/ext/standard/tests/file/dirname_error.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test dirname() function : error conditions +--CREDITS-- +Dave Kelsey +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing dirname() : error conditions *** + +-- Testing dirname() function with Zero arguments -- + +Warning: dirname() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing dirname() function with more than expected no. of arguments -- + +Warning: dirname() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== + diff --git a/ext/standard/tests/file/dirname_variation1.phpt b/ext/standard/tests/file/dirname_variation1.phpt new file mode 100644 index 0000000..15041ff --- /dev/null +++ b/ext/standard/tests/file/dirname_variation1.phpt @@ -0,0 +1,190 @@ +--TEST-- +Test dirname() function : usage variation +--CREDITS-- +Dave Kelsey +--FILE-- + 1, 'two' => 2); + +//array of values to iterate over +$inputs = array( + + // int data + 'int 0' => 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + + // float data + 'float 10.5' => 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + + // array data + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + + // null data + 'uppercase NULL' => NULL, + 'lowercase null' => null, + + // boolean data + 'lowercase true' => true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + + // empty data + 'empty string DQ' => "", + 'empty string SQ' => '', + + // object data + 'instance of classWithToString' => new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + + // undefined data + 'undefined var' => @$undefined_var, + + // unset data + 'unset var' => @$unset_var, +); + +// loop through each element of the array for path + +foreach($inputs as $key =>$value) { + echo "\n--$key--\n"; + var_dump( dirname($value) ); +}; + +?> +===DONE=== +--EXPECTF-- +*** Testing dirname() : usage variation *** + +--int 0-- +string(1) "." + +--int 1-- +string(1) "." + +--int 12345-- +string(1) "." + +--int -12345-- +string(1) "." + +--float 10.5-- +string(1) "." + +--float -10.5-- +string(1) "." + +--float 12.3456789000e10-- +string(1) "." + +--float -12.3456789000e10-- +string(1) "." + +--float .5-- +string(1) "." + +--empty array-- +Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) +NULL + +--int indexed array-- +Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) +NULL + +--associative array-- +Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) +NULL + +--nested arrays-- +Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) +NULL + +--uppercase NULL-- +string(0) "" + +--lowercase null-- +string(0) "" + +--lowercase true-- +string(1) "." + +--lowercase false-- +string(0) "" + +--uppercase TRUE-- +string(1) "." + +--uppercase FALSE-- +string(0) "" + +--empty string DQ-- +string(0) "" + +--empty string SQ-- +string(0) "" + +--instance of classWithToString-- +string(1) "." + +--instance of classWithoutToString-- +Error: 2 - dirname() expects parameter 1 to be string, object given, %s(%d) +NULL + +--undefined var-- +string(0) "" + +--unset var-- +string(0) "" +===DONE=== + diff --git a/ext/standard/tests/file/disk.phpt b/ext/standard/tests/file/disk.phpt new file mode 100644 index 0000000..6eef4b4 --- /dev/null +++ b/ext/standard/tests/file/disk.phpt @@ -0,0 +1,48 @@ +--TEST-- +disk_total_space() and disk_free_space() tests +--INI-- +precision=14 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: disk_free_space(): No such file or directory in %s on line %d +bool(false) + +Warning: disk_total_space(): No such file or directory in %s on line %d +bool(false) +float(%d) +float(%d) + +Warning: disk_free_space(): No such file or directory in %s on line %d +bool(false) + +Warning: disk_total_space(): No such file or directory in %s on line %d +bool(false) +Done diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt new file mode 100644 index 0000000..7ea8d36 --- /dev/null +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -0,0 +1,70 @@ +--TEST-- +Test disk_free_space and its alias diskfreespace() functions : basic functionality +--INI-- +memory_limit=32M +--FILE-- + $space2 ) + echo "\n Free Space Value Is Correct\n"; +else + echo "\n Free Space Value Is Incorrect\n"; + +echo "*** Testing with Binary Input ***\n"; +var_dump( disk_free_space(b"$file_path") ); + +echo"\n--- Done ---"; +?> + +--CLEAN-- + + +--EXPECTF-- +*** Testing with existing directory *** +float(%d) +float(%d) +*** Testing with newly created directory *** + + Free Space before writing to a file +float(%d) + + Free Space after writing to a file +float(%d) + + Free Space Value Is Correct +*** Testing with Binary Input *** +float(%d) + +--- Done --- diff --git a/ext/standard/tests/file/disk_free_space_error-win32.phpt b/ext/standard/tests/file/disk_free_space_error-win32.phpt new file mode 100644 index 0000000..21e7bf6 --- /dev/null +++ b/ext/standard/tests/file/disk_free_space_error-win32.phpt @@ -0,0 +1,75 @@ +--TEST-- +Test disk_free_space and its alias diskfreespace() functions : error conditions +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing error conditions *** + +Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: disk_free_space(): The system cannot find the path specified. + in %s on line %d +bool(false) + +Warning: diskfreespace(): The system cannot find the path specified. + in %s on line %d +bool(false) + +Warning: disk_free_space(): The directory name is invalid. + in %s on line %d +bool(false) + +Warning: diskfreespace(): The directory name is invalid. + in %s on line %d +bool(false) + +-- Done -- + diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt new file mode 100644 index 0000000..ddd25a3 --- /dev/null +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -0,0 +1,67 @@ +--TEST-- +Test disk_free_space and its alias diskfreespace() functions : error conditions. +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing error conditions *** + +Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: disk_free_space(): No such file or directory in %s on line %d +bool(false) + +Warning: diskfreespace(): No such file or directory in %s on line %d +bool(false) +float(%d) +float(%d) + +-- Done -- + diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt new file mode 100644 index 0000000..adb1aca --- /dev/null +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -0,0 +1,139 @@ +--TEST-- +Test disk_free_space and its alias diskfreespace() functions : Usage Variations +--FILE-- + + +--CLEAN-- + + + +--EXPECTF-- +*** Testing with a directory *** +float(%d) +float(%d) + +Testing for the return type *** +bool(true) + +*** Testing with different directory combinations *** +-- Iteration 1 -- +float(%d) +float(%d) + +-- Iteration 2 -- +float(%d) +float(%d) + +-- Iteration 3 -- +float(%d) +float(%d) + +-- Iteration 4 -- +float(%d) +float(%d) + +-- Iteration 5 -- +float(%d) +float(%d) + +-- Iteration 6 -- +float(%d) +float(%d) + +-- Iteration 7 -- +float(%d) +float(%d) + +-- Iteration 8 -- +float(%d) +float(%d) + +-- Iteration 9 -- + +Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +-- Iteration 10 -- + +Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +-- Iteration 11 -- + +Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +-- Iteration 12 -- + +Warning: disk_free_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: diskfreespace() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +--- Done --- diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt new file mode 100644 index 0000000..d211f39 --- /dev/null +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test disk_total_space() function : basic functionality +--FILE-- + +--CLEAN-- + + +--EXPECTF-- +*** Testing with normal directory *** +float(%d) +*** Testing with newly created directory *** +float(%d) + +Total Space after writing to a file +float(%d) + +-- Done -- diff --git a/ext/standard/tests/file/disk_total_space_error-win32.phpt b/ext/standard/tests/file/disk_total_space_error-win32.phpt new file mode 100644 index 0000000..a3ea183 --- /dev/null +++ b/ext/standard/tests/file/disk_total_space_error-win32.phpt @@ -0,0 +1,56 @@ +--TEST-- +Test disk_total_space() function : error conditions +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing error conditions *** + +Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: disk_total_space() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: disk_total_space(): The system cannot find the path specified. + in %s on line %d +bool(false) + +Warning: disk_total_space(): The directory name is invalid. + in %s on line %d +bool(false) + +--- Done --- + diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt new file mode 100644 index 0000000..d986f77 --- /dev/null +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test disk_total_space() function : error conditions +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing error conditions *** + +Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: disk_total_space() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: disk_total_space(): No such file or directory in %s on line %d +bool(false) +float(%d) + +--- Done --- + diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt new file mode 100644 index 0000000..ba2ceb2 --- /dev/null +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -0,0 +1,123 @@ +--TEST-- +Testing disk_total_space() functions : Usage Variations. +--FILE-- + + +--CLEAN-- + + + +--EXPECTF-- +*** Testing with a directory *** +float(%d) + +Testing for the return type *** +bool(true) + +*** Testing with different directory combinations *** +-- Iteration 1 -- +float(%d) + +-- Iteration 2 -- +float(%d) + +-- Iteration 3 -- +float(%d) + +-- Iteration 4 -- +float(%d) + +-- Iteration 5 -- +float(%d) + +-- Iteration 6 -- +float(%d) + +-- Iteration 7 -- +float(%d) + +-- Iteration 8 -- +float(%d) + +-- Iteration 9 -- + +Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +-- Iteration 10 -- + +Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +-- Iteration 11 -- + +Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +-- Iteration 12 -- + +Warning: disk_total_space() expects parameter 1 to be a valid path, string given in %s on line %d +NULL +*** Testing with Binary Input *** +float(%d) + +--- Done --- diff --git a/ext/standard/tests/file/fclose_variation1.phpt b/ext/standard/tests/file/fclose_variation1.phpt new file mode 100644 index 0000000..43a6c34 --- /dev/null +++ b/ext/standard/tests/file/fclose_variation1.phpt @@ -0,0 +1,15 @@ +--TEST-- +fclose() actually closes streams with refcount > 1 +--FILE-- + +--FILE-- + +--EXPECTF-- +*** Testing feof() : basic functionality *** + +*** testing reading complete file using feof to stop *** +some data 10 +bool(false) +*** writing 10 lines, testing feof *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +*** testing feof on unclosed file after a read *** +bool(true) +*** testing feof after a seek to near the beginning *** +bool(false) +*** testing feof after a seek to end *** +bool(false) +*** testing feof after a seek passed the end *** +bool(false) +*** closing file, testing eof *** + +Warning: feof(): %d is not a valid stream resource in %s on line %d +Done diff --git a/ext/standard/tests/file/fflush_basic.phpt b/ext/standard/tests/file/fflush_basic.phpt new file mode 100644 index 0000000..f375c4f --- /dev/null +++ b/ext/standard/tests/file/fflush_basic.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test fflush() function: basic functionality +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Testing fflush(): writing to a file and reading the contents *** +int(63) +bool(true) +first line of string +second line of string +third line of stringint(63) + +*** Testing fflush(): for return type *** +bool(true) + +*** Done *** diff --git a/ext/standard/tests/file/fflush_error.phpt b/ext/standard/tests/file/fflush_error.phpt new file mode 100644 index 0000000..6d7f731 --- /dev/null +++ b/ext/standard/tests/file/fflush_error.phpt @@ -0,0 +1,90 @@ +--TEST-- +Test fflush() function: error conditions +--FILE-- + + +--CLEAN-- + + +--EXPECTF-- +*** Testing error conditions *** +-- Testing fflush(): with zero argument -- + +Warning: fflush() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) +-- Testing fflush(): with more than expected number of arguments -- + +Warning: fflush() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) +-- Testing fflush(): with invalid arguments -- +-- Iteration 1 -- + +Warning: fflush() expects parameter 1 to be resource, string given in %s on line %d +bool(false) +-- Iteration 2 -- + +Warning: fflush() expects parameter 1 to be resource, integer given in %s on line %d +bool(false) +-- Iteration 3 -- + +Warning: fflush() expects parameter 1 to be resource, double given in %s on line %d +bool(false) +-- Iteration 4 -- + +Warning: fflush() expects parameter 1 to be resource, boolean given in %s on line %d +bool(false) +-- Iteration 5 -- + +Warning: fflush() expects parameter 1 to be resource, array given in %s on line %d +bool(false) +-- Iteration 6 -- + +Warning: fflush() expects parameter 1 to be resource, object given in %s on line %d +bool(false) + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation1-win32.phpt b/ext/standard/tests/file/fflush_variation1-win32.phpt new file mode 100644 index 0000000..0b6b096 --- /dev/null +++ b/ext/standard/tests/file/fflush_variation1-win32.phpt @@ -0,0 +1,531 @@ +--TEST-- +Test fflush() function: usage variations - files in different modes +--SKIPIF-- + + +--FILE-- + +--EXPECTF-- +*** Testing fflush(): with various types of files *** +-- Iteration 1 with file containing empty Data-- +-- File opened in w mode -- +bool(true) +bool(true) +int(0) +-- File opened in wb mode -- +bool(true) +bool(true) +int(0) +-- File opened in wt mode -- +bool(true) +bool(true) +int(0) +-- File opened in w+ mode -- +bool(true) +bool(true) +int(0) +-- File opened in w+b mode -- +bool(true) +bool(true) +int(0) +-- File opened in w+t mode -- +bool(true) +bool(true) +int(0) +-- File opened in a mode -- +bool(true) +bool(true) +int(0) +-- File opened in ab mode -- +bool(true) +bool(true) +int(0) +-- File opened in at mode -- +bool(true) +bool(true) +int(0) +-- File opened in a+ mode -- +bool(true) +bool(true) +int(0) +-- File opened in a+b mode -- +bool(true) +bool(true) +int(0) +-- File opened in a+t mode -- +bool(true) +bool(true) +int(0) +-- File opened in x mode -- +bool(true) +bool(true) +int(0) +-- File opened in xb mode -- +bool(true) +bool(true) +int(0) +-- File opened in xt mode -- +bool(true) +bool(true) +int(0) +-- File opened in x+ mode -- +bool(true) +bool(true) +int(0) +-- File opened in x+b mode -- +bool(true) +bool(true) +int(0) +-- File opened in x+t mode -- +bool(true) +bool(true) +int(0) +-- Iteration 2 with file containing numeric Data-- +-- File opened in w mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in wb mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in wt mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in w+ mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in a mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in ab mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in at mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in a+ mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in x mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in xb mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in xt mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in x+ mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- Iteration 3 with file containing text Data-- +-- File opened in w mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in wb mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in wt mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in w+ mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in a mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in ab mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in at mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in a+ mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in x mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in xb mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in xt mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in x+ mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- Iteration 4 with file containing text_with_new_line Data-- +-- File opened in w mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in wb mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in wt mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(55) +-- File opened in w+ mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(55) +-- File opened in a mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in ab mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in at mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(65) +-- File opened in a+ mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(65) +-- File opened in x mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in xb mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in xt mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(55) +-- File opened in x+ mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(55) +-- Iteration 5 with file containing alphanumeric Data-- +-- File opened in w mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in wb mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in wt mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in w+ mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in a mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in ab mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in at mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in a+ mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in x mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in xb mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in xt mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in x+ mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation1.phpt b/ext/standard/tests/file/fflush_variation1.phpt new file mode 100644 index 0000000..2ecf7ea --- /dev/null +++ b/ext/standard/tests/file/fflush_variation1.phpt @@ -0,0 +1,532 @@ +--TEST-- +Test fflush() function: usage variations - files in different modes +--SKIPIF-- + + +--FILE-- + +--EXPECTF-- +*** Testing fflush(): with various types of files *** +-- Iteration 1 with file containing empty Data-- +-- File opened in w mode -- +bool(true) +bool(true) +int(0) +-- File opened in wb mode -- +bool(true) +bool(true) +int(0) +-- File opened in wt mode -- +bool(true) +bool(true) +int(0) +-- File opened in w+ mode -- +bool(true) +bool(true) +int(0) +-- File opened in w+b mode -- +bool(true) +bool(true) +int(0) +-- File opened in w+t mode -- +bool(true) +bool(true) +int(0) +-- File opened in a mode -- +bool(true) +bool(true) +int(0) +-- File opened in ab mode -- +bool(true) +bool(true) +int(0) +-- File opened in at mode -- +bool(true) +bool(true) +int(0) +-- File opened in a+ mode -- +bool(true) +bool(true) +int(0) +-- File opened in a+b mode -- +bool(true) +bool(true) +int(0) +-- File opened in a+t mode -- +bool(true) +bool(true) +int(0) +-- File opened in x mode -- +bool(true) +bool(true) +int(0) +-- File opened in xb mode -- +bool(true) +bool(true) +int(0) +-- File opened in xt mode -- +bool(true) +bool(true) +int(0) +-- File opened in x+ mode -- +bool(true) +bool(true) +int(0) +-- File opened in x+b mode -- +bool(true) +bool(true) +int(0) +-- File opened in x+t mode -- +bool(true) +bool(true) +int(0) +-- Iteration 2 with file containing numeric Data-- +-- File opened in w mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in wb mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in wt mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in w+ mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in a mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in ab mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in at mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in a+ mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- File opened in x mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in xb mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in xt mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in x+ mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- Iteration 3 with file containing text Data-- +-- File opened in w mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in wb mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in wt mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in w+ mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in a mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in ab mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in at mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in a+ mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- File opened in x mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in xb mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in xt mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in x+ mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- Iteration 4 with file containing text_with_new_line Data-- +-- File opened in w mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in wb mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in wt mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in w+ mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in a mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in ab mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in at mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in a+ mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- File opened in x mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in xb mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in xt mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in x+ mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- Iteration 5 with file containing alphanumeric Data-- +-- File opened in w mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in wb mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in wt mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in w+ mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in w+b mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in w+t mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in a mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in ab mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in at mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in a+ mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in a+b mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in a+t mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- File opened in x mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in xb mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in xt mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in x+ mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in x+b mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- File opened in x+t mode -- +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation2.phpt b/ext/standard/tests/file/fflush_variation2.phpt new file mode 100644 index 0000000..651c716 --- /dev/null +++ b/ext/standard/tests/file/fflush_variation2.phpt @@ -0,0 +1,443 @@ +--TEST-- +Test fflush() function: usage variations - links as resource +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing fflush(): with soft links to files opened in diff modes *** +-- Iteration 1 with file containing empty data -- +-- link opened in w mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in wb mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in wt mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in w+ mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in w+b mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in w+t mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in a mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in ab mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in at mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in a+ mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in a+b mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- link opened in a+t mode -- +bool(true) +bool(true) +bool(true) +int(0) +-- Iteration 2 with file containing numeric data -- +-- link opened in w mode -- +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- link opened in wb mode -- +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- link opened in wt mode -- +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- link opened in w+ mode -- +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- link opened in w+b mode -- +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- link opened in w+t mode -- +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +-- link opened in a mode -- +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- link opened in ab mode -- +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- link opened in at mode -- +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- link opened in a+ mode -- +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- link opened in a+b mode -- +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- link opened in a+t mode -- +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- Iteration 3 with file containing text data -- +-- link opened in w mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- link opened in wb mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- link opened in wt mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- link opened in w+ mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- link opened in w+b mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- link opened in w+t mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +-- link opened in a mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- link opened in ab mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- link opened in at mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- link opened in a+ mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- link opened in a+b mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- link opened in a+t mode -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- Iteration 4 with file containing text_with_new_line data -- +-- link opened in w mode -- +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- link opened in wb mode -- +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- link opened in wt mode -- +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- link opened in w+ mode -- +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- link opened in w+b mode -- +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- link opened in w+t mode -- +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +-- link opened in a mode -- +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- link opened in ab mode -- +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- link opened in at mode -- +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- link opened in a+ mode -- +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- link opened in a+b mode -- +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- link opened in a+t mode -- +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- Iteration 5 with file containing alphanumeric data -- +-- link opened in w mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- link opened in wb mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- link opened in wt mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- link opened in w+ mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- link opened in w+b mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- link opened in w+t mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +-- link opened in a mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- link opened in ab mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- link opened in at mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- link opened in a+ mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- link opened in a+b mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +-- link opened in a+t mode -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation3.phpt b/ext/standard/tests/file/fflush_variation3.phpt new file mode 100644 index 0000000..6dfd49b --- /dev/null +++ b/ext/standard/tests/file/fflush_variation3.phpt @@ -0,0 +1,383 @@ +--TEST-- +Test fflush() function: usage variations - hard links as resource +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing fflush(): with hard links to files opened in diff modes *** +-- Iteration 1 with file containing empty data -- +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +bool(true) +bool(true) +bool(true) +int(0) +-- Iteration 2 with file containing numeric data -- +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +bool(true) +bool(true) +bool(true) +22222222222222222222222222222222222222222222222222int(50) +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +bool(true) +bool(true) +bool(true) +222222222222222222222222222222222222222222222222222222222222int(60) +-- Iteration 3 with file containing text data -- +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text int(50) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +bool(true) +bool(true) +bool(true) +text text text text text text text text text text text text int(60) +-- Iteration 4 with file containing text_with_new_line data -- +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +bool(true) +bool(true) +bool(true) +line +line of text +line +line of text +line +line of tint(50) +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +bool(true) +bool(true) +bool(true) +line +line line +line of text +line +line of text +line +line of tint(60) +-- Iteration 5 with file containing alphanumeric data -- +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) +bool(true) +bool(true) +bool(true) +ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation4.phpt b/ext/standard/tests/file/fflush_variation4.phpt new file mode 100644 index 0000000..f98616c --- /dev/null +++ b/ext/standard/tests/file/fflush_variation4.phpt @@ -0,0 +1,53 @@ +--TEST-- +Test fflush() function: usage variations - file opened in read-only mode +--FILE-- + +--EXPECTF-- +*** Testing fflush(): with file handles of files opened in various read modes *** +-- Iteration 1 with file opened in r mode -- +bool(true) +-- Iteration 2 with file opened in rb mode -- +bool(true) +-- Iteration 3 with file opened in rt mode -- +bool(true) + +*** Done *** + diff --git a/ext/standard/tests/file/fgetc_basic.phpt b/ext/standard/tests/file/fgetc_basic.phpt new file mode 100644 index 0000000..7851e43 --- /dev/null +++ b/ext/standard/tests/file/fgetc_basic.phpt @@ -0,0 +1,543 @@ +--TEST-- +Test fgetc() function : basic functionality +--FILE-- + +--EXPECTF-- +*** Testing fgetc() : basic operations *** +--- Outerloop iteration 1 --- +-- Innerloop iteration 1 of Outerloop Iteration 1 -- +-- Testing fgetc() : file opened using r mode -- +string(1) "2" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 2 of Outerloop Iteration 1 -- +-- Testing fgetc() : file opened using rb mode -- +string(1) "2" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 3 of Outerloop Iteration 1 -- +-- Testing fgetc() : file opened using rt mode -- +string(1) "2" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 4 of Outerloop Iteration 1 -- +-- Testing fgetc() : file opened using r+ mode -- +string(1) "2" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 5 of Outerloop Iteration 1 -- +-- Testing fgetc() : file opened using r+b mode -- +string(1) "2" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 6 of Outerloop Iteration 1 -- +-- Testing fgetc() : file opened using r+t mode -- +string(1) "2" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "2" +int(6) +bool(false) +resource(%d) of type (stream) +--- Outerloop iteration 2 --- +-- Innerloop iteration 1 of Outerloop Iteration 2 -- +-- Testing fgetc() : file opened using r mode -- +string(1) "t" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "x" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " " +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 2 of Outerloop Iteration 2 -- +-- Testing fgetc() : file opened using rb mode -- +string(1) "t" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "x" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " " +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 3 of Outerloop Iteration 2 -- +-- Testing fgetc() : file opened using rt mode -- +string(1) "t" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "x" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " " +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 4 of Outerloop Iteration 2 -- +-- Testing fgetc() : file opened using r+ mode -- +string(1) "t" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "x" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " " +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 5 of Outerloop Iteration 2 -- +-- Testing fgetc() : file opened using r+b mode -- +string(1) "t" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "x" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " " +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 6 of Outerloop Iteration 2 -- +-- Testing fgetc() : file opened using r+t mode -- +string(1) "t" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "x" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " " +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "t" +int(6) +bool(false) +resource(%d) of type (stream) +--- Outerloop iteration 3 --- +-- Innerloop iteration 1 of Outerloop Iteration 3 -- +-- Testing fgetc() : file opened using r mode -- +string(1) "l" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "i" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "n" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " +" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "l" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 2 of Outerloop Iteration 3 -- +-- Testing fgetc() : file opened using rb mode -- +string(1) "l" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "i" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "n" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " +" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "l" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 3 of Outerloop Iteration 3 -- +-- Testing fgetc() : file opened using rt mode -- +string(1) "l" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "i" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "n" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " +" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "l" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 4 of Outerloop Iteration 3 -- +-- Testing fgetc() : file opened using r+ mode -- +string(1) "l" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "i" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "n" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " +" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "l" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 5 of Outerloop Iteration 3 -- +-- Testing fgetc() : file opened using r+b mode -- +string(1) "l" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "i" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "n" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " +" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "l" +int(6) +bool(false) +resource(%d) of type (stream) +-- Innerloop iteration 6 of Outerloop Iteration 3 -- +-- Testing fgetc() : file opened using r+t mode -- +string(1) "l" +int(1) +bool(false) +resource(%d) of type (stream) +string(1) "i" +int(2) +bool(false) +resource(%d) of type (stream) +string(1) "n" +int(3) +bool(false) +resource(%d) of type (stream) +string(1) "e" +int(4) +bool(false) +resource(%d) of type (stream) +string(1) " +" +int(5) +bool(false) +resource(%d) of type (stream) +string(1) "l" +int(6) +bool(false) +resource(%d) of type (stream) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgetc_error.phpt b/ext/standard/tests/file/fgetc_error.phpt new file mode 100644 index 0000000..15292d6 --- /dev/null +++ b/ext/standard/tests/file/fgetc_error.phpt @@ -0,0 +1,73 @@ +--TEST-- +Test fgetc() function : error conditions +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing fgetc() : usage variations *** +-- Testing fgetc() with file whose file pointer is pointing to EOF -- +-- File opened in mode : r -- +int(0) +bool(false) +int(1024) +bool(false) +bool(true) +int(1024) +-- File opened in mode : rb -- +int(0) +bool(false) +int(1024) +bool(false) +bool(true) +int(1024) +-- File opened in mode : rt -- +int(0) +bool(false) +int(1024) +bool(false) +bool(true) +int(1024) +-- File opened in mode : r+ -- +int(0) +bool(false) +int(1024) +bool(false) +bool(true) +int(1024) +-- File opened in mode : r+b -- +int(0) +bool(false) +int(1024) +bool(false) +bool(true) +int(1024) +-- File opened in mode : r+t -- +int(0) +bool(false) +int(1024) +bool(false) +bool(true) +int(1024) +Done diff --git a/ext/standard/tests/file/fgetc_variation2.phpt b/ext/standard/tests/file/fgetc_variation2.phpt new file mode 100644 index 0000000..380c1aa --- /dev/null +++ b/ext/standard/tests/file/fgetc_variation2.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test fgetc() function : usage variations - closed handle +--FILE-- + +--EXPECTF-- +*** Testing fgetc() : usage variations *** +-- Testing fgetc() with closed handle -- + +Warning: fgetc(): %d is not a valid stream resource in %s on line %d +bool(false) +-- Testing fgetc() with unset handle -- + +Notice: Undefined variable: file_handle in %s on line %d + +Warning: fgetc() expects parameter 1 to be resource, null given in %s on line %d +bool(false) +Done diff --git a/ext/standard/tests/file/fgetc_variation3.phpt b/ext/standard/tests/file/fgetc_variation3.phpt new file mode 100644 index 0000000..f834998 --- /dev/null +++ b/ext/standard/tests/file/fgetc_variation3.phpt @@ -0,0 +1,117 @@ +--TEST-- +Test fgetc() function : usage variations - write only modes (Bug #42036) +--FILE-- + +--EXPECTF-- +*** Testing fgetc() with file opened in write only mode *** +-- File opened in mode : w -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : wb -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : wt -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : a -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : ab -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : at -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : x -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : xb -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : xt -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetc_variation4.phpt b/ext/standard/tests/file/fgetc_variation4.phpt new file mode 100644 index 0000000..a2bc9e5 --- /dev/null +++ b/ext/standard/tests/file/fgetc_variation4.phpt @@ -0,0 +1,290 @@ +--TEST-- +Test fgetc() function : usage variations - different read modes +--FILE-- + +--EXPECTF-- + *** Testing fgetc() : usage variations *** +-- Testing fgetc() with files opened with different read modes -- +-- File opened in mode : a+ -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : a+b -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : a+t -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : x+ -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : x+b -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : x+t -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : w+ -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : w+b -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +-- File opened in mode : w+t -- +bool(true) +int(0) +bool(false) +string(1) "f" +int(1) +bool(false) +string(1) "g" +int(2) +bool(false) +string(1) "e" +int(3) +bool(false) +string(1) "t" +int(4) +bool(false) +string(1) "c" +int(5) +bool(false) +string(1) " +" +int(6) +bool(false) +string(1) " " +int(7) +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgetcsv.phpt b/ext/standard/tests/file/fgetcsv.phpt new file mode 100644 index 0000000..868212c --- /dev/null +++ b/ext/standard/tests/file/fgetcsv.phpt @@ -0,0 +1,158 @@ +--TEST-- +various fgetcsv() functionality tests +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(3) "bbb" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(3) "bbb" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(3) "bbb" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(3) "bbb" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(3) "bbb" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(3) "bbb" +} +array(2) { + [0]=> + string(0) "" + [1]=> + string(0) "" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(0) "" +} +array(2) { + [0]=> + string(0) "" + [1]=> + string(3) "aaa" +} +array(2) { + [0]=> + string(0) "" + [1]=> + string(0) "" +} +array(2) { + [0]=> + string(2) "\"" + [1]=> + string(3) "aaa" +} +array(2) { + [0]=> + string(2) """" + [1]=> + string(0) "" +} +array(1) { + [0]=> + string(7) """,aaa +" +} +array(1) { + [0]=> + string(8) "\"",aaa +" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(10) "\"bbb,ccc +" +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(6) "bbb " +} +array(2) { + [0]=> + string(3) "aaa" + [1]=> + string(6) "bbb " +} +array(2) { + [0]=> + string(8) "aaa"aaa"" + [1]=> + string(6) "bbbbbb" +} +array(2) { + [0]=> + string(10) "aaa"aaa"""" + [1]=> + string(3) "bbb" +} +array(2) { + [0]=> + string(8) "aaa"\"a"" + [1]=> + string(3) "bbb" +} diff --git a/ext/standard/tests/file/fgetcsv_error.phpt b/ext/standard/tests/file/fgetcsv_error.phpt new file mode 100644 index 0000000..e2db9f8 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_error.phpt @@ -0,0 +1,96 @@ +--TEST-- +Test fgetcsv() function : error conditions +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with all parameters specified *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation10.phpt b/ext/standard/tests/file/fgetcsv_variation10.phpt new file mode 100644 index 0000000..250237c --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation10.phpt @@ -0,0 +1,1295 @@ +--TEST-- +Test fgetcsv() : usage variations - file pointer pointing to EOF +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with file pointer pointing to EOF *** + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(55) +bool(true) +bool(false) +int(55) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(59) +bool(true) +bool(false) +int(59) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(63) +bool(true) +bool(false) +int(63) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(65) +bool(true) +bool(false) +int(65) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +bool(false) +int(%d) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation11.phpt b/ext/standard/tests/file/fgetcsv_variation11.phpt new file mode 100644 index 0000000..815ede6 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation11.phpt @@ -0,0 +1,1835 @@ +--TEST-- +Test fgetcsv() : usage variations - with different enclosure but same delimiter +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with different enclosure but same delimiter char *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(7) ""water"" + [1]=> + string(7) ""fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(7) "^water^" + [1]=> + string(7) "^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(7) "&water&" + [1]=> + string(7) "&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(6) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(5) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(5) "fruit" + [4]=> + string(3) "air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(9) { + [0]=> + string(0) "" + [1]=> + string(5) "water" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(5) "fruit" + [5]=> + string(0) "" + [6]=> + string(0) "" + [7]=> + string(3) "air" + [8]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(6) { + [0]=> + string(6) "&""""&" + [1]=> + string(3) "&"&" + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(3) "&,&" + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgetcsv_variation12.phpt b/ext/standard/tests/file/fgetcsv_variation12.phpt new file mode 100644 index 0000000..e513fe6 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation12.phpt @@ -0,0 +1,957 @@ +--TEST-- +Test fgetcsv() : usage variations - two chars as enclosure & delimiter (various read and append modes) +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with two chars as enclosure & delimiter *** + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation13.phpt b/ext/standard/tests/file/fgetcsv_variation13.phpt new file mode 100644 index 0000000..a00405b --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation13.phpt @@ -0,0 +1,189 @@ +--TEST-- +Test fgetcsv() : usage variations - with line without any csv fields + +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : reading the line which is without csv fields *** + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation14.phpt b/ext/standard/tests/file/fgetcsv_variation14.phpt new file mode 100644 index 0000000..927bf8a --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation14.phpt @@ -0,0 +1,239 @@ +--TEST-- +Test fgetcsv() : usage variations - reading the blank line +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : reading the blank line *** + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +bool(false) +int(1) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation15.phpt b/ext/standard/tests/file/fgetcsv_variation15.phpt new file mode 100644 index 0000000..b36b88e --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation15.phpt @@ -0,0 +1,940 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with default enclosure *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation16.phpt b/ext/standard/tests/file/fgetcsv_variation16.phpt new file mode 100644 index 0000000..904c422 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation16.phpt @@ -0,0 +1,944 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure & length as 0 +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with default enclosure & length as 0 *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation17.phpt b/ext/standard/tests/file/fgetcsv_variation17.phpt new file mode 100644 index 0000000..a54f8da --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation17.phpt @@ -0,0 +1,1565 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure & length less than line size +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with default enclosure & length less than line size *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(3) "fru" +} +int(9) +bool(false) +array(1) { + [0]=> + string(2) "it" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(3) "air" +} +int(20) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(60) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" + [2]=> + string(43) "" +This is line of text without csv fields + +" +} +int(61) +bool(true) +bool(false) +int(61) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation18.phpt b/ext/standard/tests/file/fgetcsv_variation18.phpt new file mode 100644 index 0000000..19915e8 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation18.phpt @@ -0,0 +1,690 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure and different delimiter +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with default enclosure and different delimiter *** + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation19.phpt b/ext/standard/tests/file/fgetcsv_variation19.phpt new file mode 100644 index 0000000..2e282e1 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation19.phpt @@ -0,0 +1,841 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure & delimiter of two chars +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with default enclosure & delimiter of two chars *** + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water,fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(11) "water fruit" +} +int(12) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(13) "water "fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(19) "water\"fruit"\"air"" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "water\"fruit"\"""" +} +int(20) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation2.phpt b/ext/standard/tests/file/fgetcsv_variation2.phpt new file mode 100644 index 0000000..7b875b8 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation2.phpt @@ -0,0 +1,1413 @@ +--TEST-- +Test fgetcsv() : usage variations - with length as 0 +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with length as 0 *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(11) "water=fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(3) { + [0]=> + string(11) "water-fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation20.phpt b/ext/standard/tests/file/fgetcsv_variation20.phpt new file mode 100644 index 0000000..e96089e --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation20.phpt @@ -0,0 +1,191 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure, line without any csv fields +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with default enclosure, line without any csv fields *** + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(40) +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgetcsv_variation21.phpt b/ext/standard/tests/file/fgetcsv_variation21.phpt new file mode 100644 index 0000000..e6a9ee5 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation21.phpt @@ -0,0 +1,191 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure, blank line +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with default enclosure, blank line *** + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + NULL +} +int(1) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation22.phpt b/ext/standard/tests/file/fgetcsv_variation22.phpt new file mode 100644 index 0000000..9f35c1c --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation22.phpt @@ -0,0 +1,614 @@ +--TEST-- +Test fgetcsv() : usage variations - with default enclosure, file pointer pointing at end of file +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with default enclosure, file pointer pointing at end of file *** + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation23.phpt b/ext/standard/tests/file/fgetcsv_variation23.phpt new file mode 100644 index 0000000..b766f1e --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation23.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test fgetcsv() : usage variations - empty file +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : reading from file which is having zero content *** +bool(false) +int(0) +bool(false) +int(0) +bool(false) +int(0) +bool(false) +int(0) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation24.phpt b/ext/standard/tests/file/fgetcsv_variation24.phpt new file mode 100644 index 0000000..89b6d03 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation24.phpt @@ -0,0 +1,671 @@ +--TEST-- +Test fgetcsv() : usage variations - two chars as enclosure & delimiter (various write modes) +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with two chars as enclosure & delimiter *** + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Notice: fgetcsv(): delimiter must be a single character in %s on line %d + +Notice: fgetcsv(): enclosure must be a single character in %s on line %d +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation25.phpt b/ext/standard/tests/file/fgetcsv_variation25.phpt new file mode 100644 index 0000000..1877bc0 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation25.phpt @@ -0,0 +1,935 @@ +--TEST-- +Test fgetcsv() : usage variations - with negative length value along with enclosure and delimiter +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with negative length value *** + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation26.phpt b/ext/standard/tests/file/fgetcsv_variation26.phpt new file mode 100644 index 0000000..c042eb4 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation26.phpt @@ -0,0 +1,441 @@ +--TEST-- +Test fgetcsv() : usage variations - reading files opened in write only mode (Bug #42036) +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : reading the files opened in write only mode *** + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using wt mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using ab mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using at mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xb mode -- +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using xt mode -- +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation27.phpt b/ext/standard/tests/file/fgetcsv_variation27.phpt new file mode 100644 index 0000000..aafc3ab --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation27.phpt @@ -0,0 +1,935 @@ +--TEST-- +Test fgetcsv() : usage variations - with negative length value along with delimiter and no enclosure +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with negative length value *** + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation28.phpt b/ext/standard/tests/file/fgetcsv_variation28.phpt new file mode 100644 index 0000000..56dd538 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation28.phpt @@ -0,0 +1,935 @@ +--TEST-- +Test fgetcsv() : usage variations - with negative length value along with neither enclosure and nor delimiter +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with negative length value *** + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): Length parameter may not be negative in %s on line %d +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation29.phpt b/ext/standard/tests/file/fgetcsv_variation29.phpt new file mode 100644 index 0000000..08c7503 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation29.phpt @@ -0,0 +1,615 @@ +--TEST-- +Test fgetcsv() : usage variations - with only file handle as argument, file pointer pointing at end of file +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with file handle as only argument and file pointer pointing at end of file *** + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation3.phpt b/ext/standard/tests/file/fgetcsv_variation3.phpt new file mode 100644 index 0000000..52c094f --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation3.phpt @@ -0,0 +1,933 @@ +--TEST-- +Test fgetcsv() : usage variations - with delimiter as NULL +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with delimiter as NULL *** + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation30.phpt b/ext/standard/tests/file/fgetcsv_variation30.phpt new file mode 100644 index 0000000..e474b2d --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation30.phpt @@ -0,0 +1,614 @@ +--TEST-- +Test fgetcsv() : usage variations - with file handle and length, file pointer pointing at end of file +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with file handle and length arguments, file pointer pointing at end of file *** + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation31.phpt b/ext/standard/tests/file/fgetcsv_variation31.phpt new file mode 100644 index 0000000..1d896b7 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation31.phpt @@ -0,0 +1,616 @@ +--TEST-- +Test fgetcsv() : usage variations - with length and enclosure, file pointer pointing at end of file +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with enclosure argument, file pointer pointing at end of file *** + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(53) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(57) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rb mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using rt mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using r+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using r+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using a+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using a+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using w+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using w+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) + +-- Testing fgetcsv() with file opened using x+ mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+b mode -- +int(0) +bool(false) +bool(false) +int(61) +bool(true) + +-- Testing fgetcsv() with file opened using x+t mode -- +int(0) +bool(false) +bool(false) +int(%d) +bool(true) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation4.phpt b/ext/standard/tests/file/fgetcsv_variation4.phpt new file mode 100644 index 0000000..0c84484 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation4.phpt @@ -0,0 +1,932 @@ +--TEST-- +Test fgetcsv() : usage variations - with enclosure as NULL +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with enclosure as NULL *** + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): enclosure must be a character in %s on line %d +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation5.phpt b/ext/standard/tests/file/fgetcsv_variation5.phpt new file mode 100644 index 0000000..283fa40 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation5.phpt @@ -0,0 +1,934 @@ +--TEST-- +Test fgetcsv() : usage variations - with delimiter & enclosure as NULL +--FILE-- + +--EXPECTF-- +*** Testing fgetcsv() : with delimiter & enclosure as NULL *** + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- + +Warning: fgetcsv(): delimiter must be a character in %s on line %d +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation6.phpt b/ext/standard/tests/file/fgetcsv_variation6.phpt new file mode 100644 index 0000000..9878cb9 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation6.phpt @@ -0,0 +1,2350 @@ +--TEST-- +Test fgetcsv() : usage variations - with length less than line size +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with length less than line size *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(1) "f" +} +int(9) +bool(false) +array(1) { + [0]=> + string(4) "ruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(8) { + [0]=> + string(4) "This" + [1]=> + string(2) "is" + [2]=> + string(4) "line" + [3]=> + string(2) "of" + [4]=> + string(4) "text" + [5]=> + string(7) "without" + [6]=> + string(3) "csv" + [7]=> + string(6) "fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(56) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(6) "water=" +} +int(9) +bool(false) +array(2) { + [0]=> + string(5) "fruit" + [1]=> + string(0) "" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(58) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(6) "water-" +} +int(9) +bool(false) +array(3) { + [0]=> + string(5) "fruit" + [1]=> + string(3) "air" + [2]=> + string(0) "" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(6) { + [0]=> + string(4) """""" + [1]=> + string(1) """ + [2]=> + string(1) "," + [3]=> + string(1) """ + [4]=> + string(1) "," + [5]=> + string(4) ",,,," +} +int(24) +bool(false) +array(1) { + [0]=> + string(39) "This is line of text without csv fields" +} +int(64) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation7.phpt b/ext/standard/tests/file/fgetcsv_variation7.phpt new file mode 100644 index 0000000..723328e --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation7.phpt @@ -0,0 +1,1292 @@ +--TEST-- +Test fgetcsv() : usage variations - with default arguments value +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with default arguments value *** + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(2) { + [0]=> + string(5) "water" + [1]=> + string(5) "fruit" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(7) { + [0]=> + string(11) "&""""&:&"&:" + [1]=> + string(4) ":":&" + [2]=> + string(2) "&:" + [3]=> + string(0) "" + [4]=> + string(0) "" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +int(24) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation8.phpt b/ext/standard/tests/file/fgetcsv_variation8.phpt new file mode 100644 index 0000000..21b6c88 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation8.phpt @@ -0,0 +1,1058 @@ +--TEST-- +Test fgetcsv() : usage variations - with different delimiter and enclosure +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with different delimiter and enclosure *** + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(13) ""water",fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(15) ""water","fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(15) "^water^ ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(15) "&water&:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(15) "=water===fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(17) "-water--fruit-air" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(21) "-water---fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(23) "&""""&:&"&:,:":&,&:,,,," +} +int(24) +bool(false) +Done diff --git a/ext/standard/tests/file/fgetcsv_variation9.phpt b/ext/standard/tests/file/fgetcsv_variation9.phpt new file mode 100644 index 0000000..6400fc8 --- /dev/null +++ b/ext/standard/tests/file/fgetcsv_variation9.phpt @@ -0,0 +1,1056 @@ +--TEST-- +Test fgetcsv() : usage variations - with different delimiter but same enclosure +--FILE-- + +--EXPECT-- +*** Testing fgetcsv() : with different delimiter but same enclosure *** + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(11) "water,fruit" +} +int(14) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(13) "water,"fruit"" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(13) "water ^fruit^" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(13) "water:&fruit&" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(12) "water=fruit=" +} +int(16) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(14) "water-fruitair" +} +int(18) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(18) "water-fruit---air-" +} +int(22) +bool(false) + +-- Testing fgetcsv() with file opened using r mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rb mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using rt mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+ mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+b mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using r+t mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+ mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+b mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using a+t mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+ mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+b mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using w+t mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+ mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+b mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) + +-- Testing fgetcsv() with file opened using x+t mode -- +array(1) { + [0]=> + string(21) """"":&"&:,:":&,&:,,,," +} +int(24) +bool(false) +Done diff --git a/ext/standard/tests/file/fgets_basic.phpt b/ext/standard/tests/file/fgets_basic.phpt new file mode 100644 index 0000000..9865f1f --- /dev/null +++ b/ext/standard/tests/file/fgets_basic.phpt @@ -0,0 +1,318 @@ +--TEST-- +Test fgets() function : basic functionality +--FILE-- + +--EXPECTF-- +*** Testing fgets() : basic functionality *** + +-- Testing fgets() with file opened using mode r -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode rb -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode rt -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode r+ -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode r+b -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode r+t -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +bool(true) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgets_error.phpt b/ext/standard/tests/file/fgets_error.phpt new file mode 100644 index 0000000..51ae3c6 --- /dev/null +++ b/ext/standard/tests/file/fgets_error.phpt @@ -0,0 +1,108 @@ +--TEST-- +Test fgets() function : error conditions +--FILE-- + +--EXPECTF-- +*** Testing error conditions *** +-- Testing fgets() with zero argument -- + +Warning: fgets() expects at least 1 parameter, 0 given in %s on line %d +bool(false) +-- Testing fgets() with more than expected number of arguments -- + +Warning: fgets() expects at most 2 parameters, 3 given in %s on line %d +bool(false) +-- Testing fgets() with invalid length arguments -- + +Warning: fgets(): Length parameter must be greater than 0 in %s on line %d +bool(false) + +Warning: fgets(): Length parameter must be greater than 0 in %s on line %d +bool(false) +bool(false) +-- Testing fgets() with invalid arguments -- +-- Iteration 1 -- + +Warning: fgets() expects parameter 1 to be resource, string given in %s on line %d +bool(false) +-- Iteration 2 -- + +Warning: fgets() expects parameter 1 to be resource, integer given in %s on line %d +bool(false) +-- Iteration 3 -- + +Warning: fgets() expects parameter 1 to be resource, double given in %s on line %d +bool(false) +-- Iteration 4 -- + +Warning: fgets() expects parameter 1 to be resource, boolean given in %s on line %d +bool(false) +-- Iteration 5 -- + +Warning: fgets() expects parameter 1 to be resource, array given in %s on line %d +bool(false) +-- Iteration 6 -- + +Warning: fgets() expects parameter 1 to be resource, object given in %s on line %d +bool(false) +-- Testing fgets() with closed/unset file handle -- +Warning: fgets(): %d is not a valid stream resource in %s on line %d +bool(false) + +Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d +bool(false) +Done + diff --git a/ext/standard/tests/file/fgets_socket_variation1.phpt b/ext/standard/tests/file/fgets_socket_variation1.phpt new file mode 100644 index 0000000..57944d8 --- /dev/null +++ b/ext/standard/tests/file/fgets_socket_variation1.phpt @@ -0,0 +1,56 @@ +--TEST-- +fgets() with a socket stream +--CREDITS-- +Dave Kelsey +--FILE-- + +--EXPECT-- +Write some data: + + +Read a line from the client: +string(6) "line1 +" + + +Read another line from the client: +string(6) "line2 +" + + +Close the server side socket and read the remaining data from the client +done diff --git a/ext/standard/tests/file/fgets_socket_variation2.phpt b/ext/standard/tests/file/fgets_socket_variation2.phpt new file mode 100644 index 0000000..3500837 --- /dev/null +++ b/ext/standard/tests/file/fgets_socket_variation2.phpt @@ -0,0 +1,63 @@ +--TEST-- +fgets() over a socket with more than a buffer's worth of data +--CREDITS-- +Dave Kelsey +--FILE-- + +--EXPECT-- +Write data from the file: +int(9000) + +Read lines from the client + +Close the server side socket and read the remaining data from the client +done diff --git a/ext/standard/tests/file/fgets_variation1.phpt b/ext/standard/tests/file/fgets_variation1.phpt new file mode 100644 index 0000000..48ea231 --- /dev/null +++ b/ext/standard/tests/file/fgets_variation1.phpt @@ -0,0 +1,116 @@ +--TEST-- +Test fgets() function : usage variations - write only modes (Bug #42036) +--FILE-- + +--EXPECTF-- +*** Testing fgets() with file opened in write only mode *** +-- File opened in mode : w -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : wb -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : wt -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : a -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : ab -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : at -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : x -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : xb -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +-- File opened in mode : xt -- +bool(true) +int(0) +bool(false) +bool(false) +int(0) +bool(false) +Done diff --git a/ext/standard/tests/file/fgets_variation2.phpt b/ext/standard/tests/file/fgets_variation2.phpt new file mode 100644 index 0000000..964216b --- /dev/null +++ b/ext/standard/tests/file/fgets_variation2.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test fgets() function : usage variations - closed handle +--FILE-- + +--EXPECTF-- +*** Testing fgets() : usage variations *** +-- Testing fgets() with closed handle -- + +Warning: fgets(): %d is not a valid stream resource in %s on line %d +bool(false) + +Warning: fgets(): %d is not a valid stream resource in %s on line %d +bool(false) +-- Testing fgets() with unset handle -- + +Notice: Undefined variable: file_handle in %s on line %d + +Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d +bool(false) + +Notice: Undefined variable: file_handle in %s on line %d + +Warning: fgets() expects parameter 1 to be resource, null given in %s on line %d +bool(false) +Done + diff --git a/ext/standard/tests/file/fgets_variation3.phpt b/ext/standard/tests/file/fgets_variation3.phpt new file mode 100644 index 0000000..4f03641 --- /dev/null +++ b/ext/standard/tests/file/fgets_variation3.phpt @@ -0,0 +1,500 @@ +--TEST-- +Test fgets() function : usage variations - read with/without length +--FILE-- + +--EXPECTF-- +*** Testing fgets() : usage variations *** + +-- Testing fgets() with file opened using mode w+ -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode w+b -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode w+t -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode a+ -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode a+b -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode a+t -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode x+ -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode x+b -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) + +-- Testing fgets() with file opened using mode x+t -- +-- File content type : numeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "2222222222222222222222" +int(22) +bool(false) +-- File content type : text -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "text text text text te" +int(22) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with default length, file pointer at 0 -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with length = 23, Expected: 22 chars, file pointer at 0 -- +int(0) +string(22) "ab12 ab12 ab12 ab12 ab" +int(22) +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgets_variation4-win32.phpt b/ext/standard/tests/file/fgets_variation4-win32.phpt new file mode 100644 index 0000000..6d2bbf6 --- /dev/null +++ b/ext/standard/tests/file/fgets_variation4-win32.phpt @@ -0,0 +1,574 @@ +--TEST-- +Test fgets() function : usage variations - seek n read +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing fgets() : usage variations *** + +-- Testing fgets() with file opened using mode w+ -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode w+b -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode w+t -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(1) " +" +int(6) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(12) "ine of text +" +int(37) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode a+ -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode a+b -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode a+t -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(1) " +" +int(6) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(12) "ine of text +" +int(37) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode x+ -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode x+b -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode x+t -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(1) " +" +int(6) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(12) "ine of text +" +int(37) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) +Done diff --git a/ext/standard/tests/file/fgets_variation4.phpt b/ext/standard/tests/file/fgets_variation4.phpt new file mode 100644 index 0000000..4ffa3f1 --- /dev/null +++ b/ext/standard/tests/file/fgets_variation4.phpt @@ -0,0 +1,574 @@ +--TEST-- +Test fgets() function : usage variations - seek n read +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing fgets() : usage variations *** + +-- Testing fgets() with file opened using mode w+ -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode w+b -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode w+t -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode a+ -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode a+b -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode a+t -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode x+ -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode x+b -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) + +-- Testing fgets() with file opened using mode x+t -- +-- File content type : numeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "2222222222222222222" +int(44) +bool(false) +-- File content type : text -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "text text text text text text text text text " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "text text text text" +int(44) +bool(false) +-- File content type : text_with_new_line -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(13) "line of text +" +int(18) +bool(false) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(11) "ne of text +" +int(36) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with location set by fseek() with default length -- +int(0) +int(5) +string(45) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +-- fgets() with location set by fseek() with length = 20 -- +int(0) +int(25) +string(19) "ab12 ab12 ab12 ab12" +int(44) +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgets_variation5.phpt b/ext/standard/tests/file/fgets_variation5.phpt new file mode 100644 index 0000000..4a1ed9f --- /dev/null +++ b/ext/standard/tests/file/fgets_variation5.phpt @@ -0,0 +1,302 @@ +--TEST-- +Test fgets() function : usage variations - read beyond filesize +--FILE-- + filesize --\n"; + rewind($file_handle); + + var_dump( ftell($file_handle) ); + var_dump( fgets($file_handle, 50 + 23) ); // expected: 50 + var_dump( ftell($file_handle) ); // ensure the file pointer position + var_dump( feof($file_handle) ); // enusre if eof set + + //close file + fclose($file_handle); + + // delete file + delete_file($filename); + } // file_content_type loop +} // file_mode loop + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing fgets() : usage variations *** + +-- Testing fgets() with file opened using mode w+ -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode w+b -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode w+t -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+ -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+b -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+t -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+ -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+b -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+t -- +-- File content type : numeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "22222222222222222222222222222222222222222222222222" +int(50) +bool(true) +-- File content type : text -- +-- fgets() with length > filesize -- +int(0) +string(50) "text text text text text text text text text text " +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with length > filesize -- +int(0) +string(5) "line +" +int(5) +bool(false) +-- File content type : alphanumeric -- +-- fgets() with length > filesize -- +int(0) +string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " +int(50) +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgets_variation6-win32.phpt b/ext/standard/tests/file/fgets_variation6-win32.phpt new file mode 100644 index 0000000..14cb46f --- /dev/null +++ b/ext/standard/tests/file/fgets_variation6-win32.phpt @@ -0,0 +1,372 @@ +--TEST-- +Test fgets() function : usage variations - read when file pointer at EOF +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing fgets() : usage variations *** + +-- Testing fgets() with file opened using mode w+ -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode w+b -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode w+t -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(55) +bool(false) +bool(false) +int(55) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+ -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+b -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+t -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(55) +bool(false) +bool(false) +int(55) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+ -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+b -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+t -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(55) +bool(false) +bool(false) +int(55) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +Done diff --git a/ext/standard/tests/file/fgets_variation6.phpt b/ext/standard/tests/file/fgets_variation6.phpt new file mode 100644 index 0000000..da6c214 --- /dev/null +++ b/ext/standard/tests/file/fgets_variation6.phpt @@ -0,0 +1,372 @@ +--TEST-- +Test fgets() function : usage variations - read when file pointer at EOF +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing fgets() : usage variations *** + +-- Testing fgets() with file opened using mode w+ -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode w+b -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode w+t -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+ -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+b -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode a+t -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+ -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+b -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) + +-- Testing fgets() with file opened using mode x+t -- +-- File content type : numeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : text_with_new_line -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +-- File content type : alphanumeric -- +-- fgets() with file pointer pointing at EOF -- +int(0) +int(50) +bool(false) +bool(false) +int(50) +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/fgetss.phpt b/ext/standard/tests/file/fgetss.phpt new file mode 100644 index 0000000..b4ac211 --- /dev/null +++ b/ext/standard/tests/file/fgetss.phpt @@ -0,0 +1,83 @@ +--TEST-- +fgetss() tests +--FILE-- +aaaaaa\ndddddd", + "asdqw\naaaa<>qqqq", + "aaaqqq", + "asdasdblah", + "some another text <> hoho " + ); + +foreach ($array as $str) { + file_put_contents($filename, $str); + $fp = fopen($filename, "r"); + var_dump(fgetss($fp)); + var_dump(fgetss($fp)); +} + +foreach ($array as $str) { + file_put_contents($filename, $str); + $fp = fopen($filename, "r"); + var_dump(fgetss($fp, 10)); + var_dump(fgetss($fp, 10)); +} + +var_dump(fgetss($fp, -10)); +var_dump(fgetss($fp, 0)); +fclose($fp); +var_dump(fgetss($fp, 0)); + +@unlink($filename); + +echo "Done\n"; +?> +--EXPECTF-- +string(18) "askasdfasdfaaaaaa +" +string(6) "dddddd" +string(6) "asdqw +" +string(8) "aaaaqqqq" +string(23) "aaafunction foo() {}qqq" +bool(false) +string(6) "asdasd" +string(0) "" +bool(false) +bool(false) +string(11) "some text +" +string(4) "blah" +string(24) "some another text hoho " +bool(false) +string(9) "askasdfas" +string(6) "dfaaaa" +string(5) "asdqw" +string(0) "" +string(3) "aaa" +string(7) "functio" +string(6) "asdasd" +string(0) "" +bool(false) +bool(false) +string(9) "some text" +string(2) " +" +string(9) "some anot" +string(9) "her text " + +Warning: fgetss(): Length parameter must be greater than 0 in %s on line %d +bool(false) + +Warning: fgetss(): Length parameter must be greater than 0 in %s on line %d +bool(false) + +Warning: fgetss(): %d is not a valid stream resource in %s on line %d +bool(false) +Done diff --git a/ext/standard/tests/file/fgetss1.phpt b/ext/standard/tests/file/fgetss1.phpt new file mode 100644 index 0000000..96b8b6f --- /dev/null +++ b/ext/standard/tests/file/fgetss1.phpt @@ -0,0 +1,69 @@ +--TEST-- +more fgetss() tests +--FILE-- +aaaaaa\ndddddd", + "asdqw\naaaa<>qqqq", + "aaaqqq", + "asdasdblah", + "some another text <> hoho " + ); + +foreach ($array as $str) { + file_put_contents($filename, $str); + $fp = fopen($filename, "r"); + var_dump(fgetss($fp, 1000, ",,")); + var_dump(fgetss($fp)); +} + +foreach ($array as $str) { + file_put_contents($filename, $str); + $fp = fopen($filename, "r"); + var_dump(fgetss($fp, 10)); + var_dump(fgetss($fp, 10, "