]> granicus.if.org Git - php/commitdiff
These files are now split into one or more smaller testcases, hence being deleted.
authorRaghubansh Kumar <kraghuba@php.net>
Sun, 8 Jul 2007 12:41:44 +0000 (12:41 +0000)
committerRaghubansh Kumar <kraghuba@php.net>
Sun, 8 Jul 2007 12:41:44 +0000 (12:41 +0000)
12 files changed:
ext/standard/tests/file/006_variation.phpt [deleted file]
ext/standard/tests/file/file_get_contents_file_put_contents_variation.phpt [deleted file]
ext/standard/tests/file/filesize_variation-win32.phpt [deleted file]
ext/standard/tests/file/filesize_variation.phpt [deleted file]
ext/standard/tests/file/fwrite_variation-win32.phpt [deleted file]
ext/standard/tests/file/fwrite_variation.phpt [deleted file]
ext/standard/tests/file/is_executable_variation.phpt [deleted file]
ext/standard/tests/file/is_readable_variation.phpt [deleted file]
ext/standard/tests/file/is_writable_variation.phpt [deleted file]
ext/standard/tests/file/symlink_link_linkinfo_is_link_basic.phpt [deleted file]
ext/standard/tests/file/symlink_link_linkinfo_is_link_error.phpt [deleted file]
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation.phpt [deleted file]

diff --git a/ext/standard/tests/file/006_variation.phpt b/ext/standard/tests/file/006_variation.phpt
deleted file mode 100644 (file)
index 787e6f4..0000000
+++ /dev/null
@@ -1,2735 +0,0 @@
---TEST--
-Test fileperms() & chmod() functions: usage variation
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip Not on Windows');
-}
-elseif (get_current_user() == 'root') {
- die( "skip Do not run with root permissions" );
-}
-?>
---FILE--
-<?php
-/* 
-  Prototype: int fileperms ( string $filename );
-  Description: Returns the permissions on the file, or FALSE in case of an error
-
-  Prototype: bool chmod ( string $filename, int $mode );
-  Description: Attempts to change the mode of the file specified by 
-               filename to that given in mode
-*/
-
-echo "*** Testing fileperms() & chmod() : usage variations ***\n";
-
-$file_name = dirname(__FILE__)."/006_variation.tmp";
-$file_handle = fopen($file_name, "w");
-fclose($file_handle);
-$dir_name = dirname(__FILE__)."/006_variation";
-mkdir($dir_name);
-
-$count = 1;
-echo "-- Testing all permission from octal 0000 to octal 0777 on file and dir --\n";
-for($mode = 0000; $mode <= 0777; $mode++) {
-  echo "-- Iteration $count --\n";
-  var_dump( chmod($file_name, $mode) ); 
-  printf("%o", fileperms($file_name) );
-  echo "\n";
-  clearstatcache();
-
-  var_dump( chmod($dir_name, $mode) );
-  printf("%o", fileperms($dir_name) );
-  echo "\n";
-  clearstatcache();
-  $count++;
-}
-
-echo "\n*** Testing fileperms(), chmod() with miscellaneous permissions ***\n";
-$perms_array = array(
-  /* testing sticky bit */
-  07777,
-  00000,
-  01000,
-  011111,
-  /* negative  values as permission */
-  -0777, // permissions will be given as 2's complement form of -0777
-  -07777, // permissions will be given as 2's complement form of -07777
-
-  /* decimal values as permission  */
-  777, // permissions will be given as octal equivalent value of 777
-  7777, // permissions will be given as octal equivalent value of 7777
-  -7777, // permissions are given as 2's complement of octal equivalent of 7777
-
-  /* hex value as permission */
-  0x777, // permissions will be given as ocatal equivalent value of 0x777
-  0x7777,
-
-  /* strings notation of permission,  wont work properly */
-  "r+w",
-  "r+w+x",
-  "u+rwx",
-  "u+rwx, g+rw, o+wx"
-);
-
-$count = 1;
-foreach($perms_array as $permission) {
-  echo "-- Iteration $count --\n";
-  var_dump( chmod($file_name, $permission) );
-  printf("%o", fileperms($file_name) );
-  echo "\n";
-  clearstatcache();
-  var_dump( chmod($dir_name, $permission) );
-  printf("%o", fileperms($dir_name) );
-  echo "\n";
-  clearstatcache();
-  $count++;
-}
-echo "*** Done ***\n";
-?>
---CLEAN--
-<?php
-unlink(dirname(__FILE__)."/006_variation.tmp");
-rmdir(dirname(__FILE__)."/006_variation");
-?>
---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
-
-*** 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 --
-bool(true)
-100000
-bool(true)
-40000
--- Iteration 13 --
-bool(true)
-100000
-bool(true)
-40000
--- Iteration 14 --
-bool(true)
-100000
-bool(true)
-40000
--- Iteration 15 --
-bool(true)
-100000
-bool(true)
-40000
-*** Done ***
\ No newline at end of file
diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_variation.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_variation.phpt
deleted file mode 100644 (file)
index 2f87004..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
---TEST--
-Test file_get_contents() and file_put_contents() functions : usage variations
-
---FILE--
-<?php
-/* Prototype: string file_get_contents( string $filename[, bool $use_include_path[, 
- *                                      resource $context[, int $offset[, int $maxlen]]]] )
- * Description: Reads entire file into a string
- */
-
-/* Prototype: int file_put_contents( string $filename, mixed $data[,int $flags[, resource $context]] )
- * Description: Write a string to a file
- */
-
-$file_path = dirname(__FILE__);
-include($file_path."/file.inc");
-
-echo "*** Testing with variations in the arguments values ***\n";
-
-$buffer_types = array("text", "numeric", "text_with_new_line", "alphanumeric");
-
-foreach( $buffer_types as $type) {
-  fill_buffer($buffer, $type, 100);
-  file_put_contents( $file_path."/file_put_contents.tmp", $buffer);
-  var_dump( file_get_contents($file_path."/file_put_contents.tmp", 0) );
-  var_dump( file_get_contents($file_path."/file_put_contents.tmp", 1) );
-  var_dump( file_get_contents($file_path."/file_put_contents.tmp", 0, NULL, 5) );
-  var_dump( file_get_contents($file_path."/file_put_contents.tmp", 1, NULL, 5) );
-  var_dump( file_get_contents($file_path."/file_put_contents.tmp", 0, NULL, 5, 20) );
-  var_dump( file_get_contents($file_path."/file_put_contents.tmp", 1, NULL, 5, 20) );
-
-}
-
-echo "*** Testing with variation in use_include_path argument ***\n";
-$dir = "file_get_contents";
-mkdir($file_path."/".$dir);
-$filename = $file_path."/".$dir."/"."file_get_contents1.tmp";
-
-ini_set( 'include_path',$file_path."/".$dir );
-
-$data_array = array( 1, "  Data1 in an array", 2, "  Data2 in an array" );
-fill_buffer( $buffer, "text", 100);
-file_put_contents( $filename, $buffer );
-fill_buffer( $buffer, "numeric", 100);
-file_put_contents( $filename, $buffer, FILE_APPEND, NULL );
-file_put_contents( $filename, $data_array, FILE_APPEND, NULL );
-var_dump( file_get_contents($filename, 0) );
-var_dump( file_get_contents($filename, 1) );
-var_dump( file_get_contents($filename, 0, NULL, 5) );
-var_dump( file_get_contents($filename, 1, NULL, 5) );
-var_dump( file_get_contents($filename, 0, NULL, 5, 20) );
-var_dump( file_get_contents($filename, 1, NULL, 5, 20) );
-
-echo "--- Done ---";
-?>
---CLEAN--
-<?php
-//Deleting the temporary files and directory used in the testcase
-
-$file_path = dirname(__FILE__);
-unlink($file_path."/file_put_contents.tmp");
-unlink($file_path."/file_get_contents/file_get_contents1.tmp");
-rmdir($file_path."/file_get_contents");
-
-?>
---EXPECTF--
-*** Testing with variations in the arguments values ***
-string(100) "text text text text text text text text text text text text text text text text text text text text "
-string(100) "text text text text text text text text text text text text text text text text text text text text "
-string(95) "text text text text text text text text text text text text text text text text text text text "
-string(95) "text text text text text text text text text text text text text text text text text text text "
-string(20) "text text text text "
-string(20) "text text text text "
-string(100) "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"
-string(100) "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"
-string(95) "22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"
-string(95) "22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"
-string(20) "22222222222222222222"
-string(20) "22222222222222222222"
-string(100) "line
-line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line "
-string(100) "line
-line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line "
-string(95) "line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line "
-string(95) "line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line of text
-line
-line "
-string(20) "line of text
-line
-li"
-string(20) "line of text
-line
-li"
-string(100) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
-string(100) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
-string(95) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
-string(95) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
-string(20) "ab12 ab12 ab12 ab12 "
-string(20) "ab12 ab12 ab12 ab12 "
-*** Testing with variation in use_include_path argument ***
-string(240) "text text text text text text text text text text text text text text text text text text text text 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221  Data1 in an array2  Data2 in an array"
-string(240) "text text text text text text text text text text text text text text text text text text text text 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221  Data1 in an array2  Data2 in an array"
-string(235) "text text text text text text text text text text text text text text text text text text text 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221  Data1 in an array2  Data2 in an array"
-string(235) "text text text text text text text text text text text text text text text text text text text 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221  Data1 in an array2  Data2 in an array"
-string(20) "text text text text "
-string(20) "text text text text "
---- Done ---
diff --git a/ext/standard/tests/file/filesize_variation-win32.phpt b/ext/standard/tests/file/filesize_variation-win32.phpt
deleted file mode 100644 (file)
index ed215c0..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
---TEST--
-Test filesize() function: usage variations
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
-    die('skip only valid for Windows');
-}
---FILE--
-<?php
-/* 
- Prototype   : int filesize ( string $filename );
- Description : Returns the size of the file in bytes, or FALSE 
-   (and generates an error of level E_WARNING) in case of an error.
-*/
-
-$file_path = dirname(__FILE__);
-require($file_path."/file.inc");
-
-echo "*** Testing filesize(): usage variations ***\n"; 
-
-echo "*** Checking filesize() with different size of files ***\n";
-for($size = 1; $size <10000; $size = $size+1000)
-{
-  create_files($file_path, 1, "numeric", 0755, $size, "w", "filesize_variation");
-  var_dump( filesize( $file_path."/filesize_variation1.tmp") );
-  clearstatcache();
-  delete_files($file_path, 1, "filesize_variation");
-}
-
-echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
-echo "-- Creating a base dir, and checking its size --\n";
-mkdir( $file_path."/filesize_variation");
-var_dump( filesize( $file_path."/filesize_variation"));
-clearstatcache();
-
-echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 
-create_files($file_path."/filesize_variation", 1, "numeric", 0755, 1, "w", "filesize_variation");
-var_dump( filesize( $file_path."/filesize_variation"));
-clearstatcache();
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation1.tmp"));
-clearstatcache();
-delete_files($file_path."/filesize_variation", 1, "filesize_variation");
-
-echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n";
-mkdir( $file_path."/filesize_variation/filesize_variation_sub");
-var_dump( filesize( $file_path."/filesize_variation")); // size of base dir
-clearstatcache();
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation_sub")); // size of subdir
-clearstatcache();
-
-echo "-- Creating a file inside sub-dir, and checking size of base, subdir and file created --\n";
-// create only the file, as base and subdir is already created
-$filename =  $file_path."/filesize_variation/filesize_variation_sub/filesize_variation.tmp";
-$file_handle = fopen($filename, "w");
-fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
-fclose($file_handle);
-// size of base dir
-var_dump( filesize( $file_path."/filesize_variation"));
-clearstatcache();
-// size of subdir
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation_sub"));
-clearstatcache();
-// size of file inside subdir
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation_sub/filesize_variation.tmp"));
-clearstatcache();
-
-echo "-- Testing filesize() after truncating the file to a new length --\n";
-// truncate the file created earlier in subdir, the size of the file is 12000bytes
-// truncate the same file, in the loop , each time with the decrement in size by 1200 bytes,
-//  until -1200bytes size
-for($size = filesize($filename); $size>=-1200; $size-=1200) {
-  $file_handle = fopen($filename, "r+");
-  var_dump( ftruncate($file_handle, $size) );
-  fclose($file_handle);
-  var_dump( filesize($filename) );
-  clearstatcache();
-}
-
-echo "-- Testing filesize() with the data of possible chars --\n";
-$filename2 = $file_path."/filesize_variation1.tmp";
-$string = "Test 2 test the filesize() fn, with data containing all the types like !@@##$%^&*():<>?|~+!;',.\][{}(special) chars, 12345(numeric) chars, and \n(newline char), \t(tab), \0, \r and so on........\0";
-echo "-- opening the file in 'w' mode and get the size --\n";
-$file_handle = fopen($filename2, "w");
-var_dump( strlen($string) );  //strlen of the string
-fwrite($file_handle, $string);
-fclose($file_handle);
-var_dump( filesize($filename2) );  //size of the file = strlen of string
-clearstatcache();
-
-echo "-- opening the file in 'wt' mode and get the size --\n";
-$file_handle = fopen($filename2, "wt");
-var_dump( strlen($string) );  //strlen of the string = 191 bytes
-fwrite($file_handle, $string);
-fclose($file_handle);
-/* '\n' treated as '\r\n' i.e two chars in 'wt' mode */
-var_dump( filesize($filename2) );  //size of the file = 192 bytes != strlen of string
-clearstatcache();
-
-echo "-- opening the file in 'a' mode, adding data and checking the file --\n";
-$file_handle = fopen($filename2, "a");
-fwrite($file_handle, "Hello, world");
-fclose($file_handle);
-/* '\n' treated as '\r\n' i.e two chars in 'wt' mode */
-var_dump( filesize($filename2) );  //204 bytes
-clearstatcache();
-
-echo "-- opening the file in 'at' mode, adding data and checking the file --\n";
-$file_handle = fopen($filename2, "at");
-fwrite($file_handle, "Hello, world\n");
-fclose($file_handle);
-/* '\n' treated as '\r\n' i.e two chars in 'wt' mode */
-var_dump( filesize($filename2) );  //218 bytes
-clearstatcache();
-
-echo "-- creating a hole and checking the size --\n";
-$file_handle = fopen($filename2, "a");
-var_dump( ftruncate($file_handle, 220) );  //creating 4 bytes of hole
-fclose($file_handle);
-var_dump( filesize($filename2) );  //220 bytes
-clearstatcache();
-
-echo "-- writing data after hole and checking the size --\n";
-$file_handle = fopen($filename2, "a");
-fwrite($file_handle, "Hello\0");  //wrting 6 bytes of data
-fclose($file_handle);
-var_dump( filesize($filename2) );  //226 bytes
-clearstatcache();
-
-echo "-- opening the existing file in write mode --\n";
-fclose( fopen($filename2, "w") );
-var_dump( filesize($filename2) );  //0 bytes
-clearstatcache();
-
-echo "-- with empty file --\n";
-$filename3 = dirname(__FILE__)."/filesize_variation_empty.tmp";
-fclose( fopen($filename3, "w") );
-var_dump( filesize($filename3) );  //0 bytes
-
-echo "*** Done ***\n";
-?>
---CLEAN--
-<?php
-$file_path = dirname(__FILE__);
-rmdir($file_path."/filesize_variation");
-unlink($file_path."/filesize_variation/filesize_variation_sub/filesize_variation.tmp");
-rmdir($file_path."/filesize_variation/filesize_variation_sub");
-rmdir($file_path."/filesize_variation");
-unlink($file_path."/filesize_variation1.tmp");
-unlink($file_path."/filesize_variation_empty.tmp");
-?>
---EXPECTF--
-*** Testing filesize(): usage variations ***
-*** Checking filesize() with different size of files ***
-int(1024)
-int(1025024)
-int(2049024)
-int(3073024)
-int(4097024)
-int(5121024)
-int(6145024)
-int(7169024)
-int(8193024)
-int(9217024)
-
-*** Testing size of a dir, sub-dir and file with filesize() ***
--- Creating a base dir, and checking its size --
-int(0)
--- Creating a file inside base dir, and checking dir & file size --
-int(0)
-int(1024)
--- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --
-int(0)
-int(0)
--- Creating a file inside sub-dir, and checking size of base, subdir and file created --
-int(0)
-int(0)
-int(12000)
--- Testing filesize() after truncating the file to a new length --
-bool(true)
-int(12000)
-bool(true)
-int(10800)
-bool(true)
-int(9600)
-bool(true)
-int(8400)
-bool(true)
-int(7200)
-bool(true)
-int(6000)
-bool(true)
-int(4800)
-bool(true)
-int(3600)
-bool(true)
-int(2400)
-bool(true)
-int(1200)
-bool(true)
-int(0)
-bool(false)
-int(0)
--- Testing filesize() with the data of possible chars --
--- opening the file in 'w' mode and get the size --
-int(191)
-int(191)
--- opening the file in 'wt' mode and get the size --
-int(191)
-int(192)
--- opening the file in 'a' mode, adding data and checking the file --
-int(204)
--- opening the file in 'at' mode, adding data and checking the file --
-int(218)
--- creating a hole and checking the size --
-bool(true)
-int(220)
--- writing data after hole and checking the size --
-int(226)
--- opening the existing file in write mode --
-int(0)
--- with empty file --
-int(0)
-*** Done ***
\ No newline at end of file
diff --git a/ext/standard/tests/file/filesize_variation.phpt b/ext/standard/tests/file/filesize_variation.phpt
deleted file mode 100644 (file)
index 883bb8c..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
---TEST--
-Test filesize() function: usage variations
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip only valid for Linux');
-}
---FILE--
-<?php
-/* 
- Prototype   : int filesize ( string $filename );
- Description : Returns the size of the file in bytes, or FALSE 
-   (and generates an error of level E_WARNING) in case of an error.
-*/
-
-$file_path = dirname(__FILE__);
-require($file_path."/file.inc");
-
-echo "*** Testing filesize(): usage variations ***\n"; 
-
-echo "*** Checking filesize() with different size of files ***\n";
-for($size = 1; $size <10000; $size = $size+1000)
-{
-  create_files($file_path, 1, "numeric", 0755, $size, "w", "filesize_variation");
-  var_dump( filesize( $file_path."/filesize_variation1.tmp") );
-  clearstatcache();
-  delete_files($file_path, 1, "filesize_variation");
-}
-
-echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
-echo "-- Creating a base dir, and checking its size --\n";
-mkdir( $file_path."/filesize_variation");
-var_dump( filesize( $file_path."/filesize_variation"));
-clearstatcache();
-
-echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 
-create_files($file_path."/filesize_variation", 1, "numeric", 0755, 1, "w", "filesize_variation");
-var_dump( filesize( $file_path."/filesize_variation"));
-clearstatcache();
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation1.tmp"));
-clearstatcache();
-delete_files($file_path."/filesize_variation", 1, "filesize_variation");
-
-echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n";
-mkdir( $file_path."/filesize_variation/filesize_variation_sub");
-var_dump( filesize( $file_path."/filesize_variation")); // size of base dir
-clearstatcache();
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation_sub")); // size of subdir
-clearstatcache();
-
-echo "-- Creating a file inside sub-dir, and checking size of base, subdir and file created --\n";
-// create only the file, as base and subdir is already created
-$filename =  $file_path."/filesize_variation/filesize_variation_sub/filesize_variation.tmp";
-$file_handle = fopen($filename, "w");
-fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
-fclose($file_handle);
-// size of base dir
-var_dump( filesize( $file_path."/filesize_variation"));
-clearstatcache();
-// size of subdir
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation_sub"));
-clearstatcache();
-// size of file inside subdir
-var_dump( filesize( $file_path."/filesize_variation/filesize_variation_sub/filesize_variation.tmp"));
-clearstatcache();
-
-echo "-- Testing filesize() after truncating the file to a new length --\n";
-// truncate the file created earlier in subdir, the size of the file is 12000bytes
-// truncate the same file, in the loop , each time with the decrement in size by 1200 bytes,
-//  until -1200bytes size
-for($size = filesize($filename); $size>=-1200; $size-=1200) {
-  $file_handle = fopen($filename, "r+");
-  var_dump( ftruncate($file_handle, $size) );
-  fclose($file_handle);
-  var_dump( filesize($filename) );
-  clearstatcache();
-}
-
-echo "-- Testing filesize() with the data of possible chars --\n";
-$filename2 = $file_path."/filesize_variation1.tmp";
-$string = "Test 2 test the filesize() fn, with data containing all the types like !@@##$%^&*():<>?|~+!;',.\][{}(special) chars, 12345(numeric) chars, and \n(newline char), \t(tab), \0, \r and so on........\0";
-echo "-- opening the file in 'w' mode and get the size --\n";
-$file_handle = fopen($filename2, "w");
-var_dump( strlen($string) );  //strlen of the string
-fwrite($file_handle, $string);
-fclose($file_handle);
-var_dump( filesize($filename2) );  //size of the file = strlen of string
-clearstatcache();
-
-echo "-- opening the file in 'wt' mode and get the size --\n";
-$file_handle = fopen($filename2, "wt");
-var_dump( strlen($string) );  //strlen of the string = 191 bytes
-fwrite($file_handle, $string);
-fclose($file_handle);
-var_dump( filesize($filename2) );  //size of the file = strlen of string = 191 bytes
-clearstatcache();
-
-echo "-- opening the file in 'a' mode, adding data and checking the file --\n";
-$file_handle = fopen($filename2, "a");
-fwrite($file_handle, "Hello, world");
-fclose($file_handle);
-var_dump( filesize($filename2) );  //203 bytes
-clearstatcache();
-
-echo "-- opening the file in 'at' mode, adding data and checking the file --\n";
-$file_handle = fopen($filename2, "at");
-fwrite($file_handle, "Hello, world\n");
-fclose($file_handle);
-var_dump( filesize($filename2) );  //216 bytes
-clearstatcache();
-
-echo "-- creating a hole and checking the size --\n";
-$file_handle = fopen($filename2, "a");
-var_dump( ftruncate($file_handle, 220) );  //creating 4 bytes of hole
-fclose($file_handle);
-var_dump( filesize($filename2) );  //220 bytes
-clearstatcache();
-
-echo "-- writing data after hole and checking the size --\n";
-$file_handle = fopen($filename2, "a");
-fwrite($file_handle, "Hello\0");  //wrting 6 bytes of data
-fclose($file_handle);
-var_dump( filesize($filename2) );  //226 bytes
-clearstatcache();
-
-echo "-- opening the existing file in write mode --\n";
-fclose( fopen($filename2, "w") );
-var_dump( filesize($filename2) );  //0 bytes
-clearstatcache();
-
-echo "-- with empty file --\n";
-$filename3 = dirname(__FILE__)."/filesize_variation_empty.tmp";
-fclose( fopen($filename3, "w") );
-var_dump( filesize($filename3) );  //0 bytes
-
-echo "*** Done ***\n";
-?>
---CLEAN--
-<?php
-$file_path = dirname(__FILE__);
-rmdir($file_path."/filesize_variation");
-unlink($file_path."/filesize_variation/filesize_variation_sub/filesize_variation.tmp");
-rmdir($file_path."/filesize_variation/filesize_variation_sub");
-rmdir($file_path."/filesize_variation");
-unlink($file_path."/filesize_variation1.tmp");
-unlink($file_path."/filesize_variation_empty.tmp");
-?>
---EXPECTF--
-*** Testing filesize(): usage variations ***
-*** Checking filesize() with different size of files ***
-int(1024)
-int(1025024)
-int(2049024)
-int(3073024)
-int(4097024)
-int(5121024)
-int(6145024)
-int(7169024)
-int(8193024)
-int(9217024)
-
-*** Testing size of a dir, sub-dir and file with filesize() ***
--- Creating a base dir, and checking its size --
-int(4096)
--- Creating a file inside base dir, and checking dir & file size --
-int(4096)
-int(1024)
--- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --
-int(4096)
-int(4096)
--- Creating a file inside sub-dir, and checking size of base, subdir and file created --
-int(4096)
-int(4096)
-int(12000)
--- Testing filesize() after truncating the file to a new length --
-bool(true)
-int(12000)
-bool(true)
-int(10800)
-bool(true)
-int(9600)
-bool(true)
-int(8400)
-bool(true)
-int(7200)
-bool(true)
-int(6000)
-bool(true)
-int(4800)
-bool(true)
-int(3600)
-bool(true)
-int(2400)
-bool(true)
-int(1200)
-bool(true)
-int(0)
-bool(false)
-int(0)
--- Testing filesize() with the data of possible chars --
--- opening the file in 'w' mode and get the size --
-int(191)
-int(191)
--- opening the file in 'wt' mode and get the size --
-int(191)
-int(191)
--- opening the file in 'a' mode, adding data and checking the file --
-int(203)
--- opening the file in 'at' mode, adding data and checking the file --
-int(216)
--- creating a hole and checking the size --
-bool(true)
-int(220)
--- writing data after hole and checking the size --
-int(226)
--- opening the existing file in write mode --
-int(0)
--- with empty file --
-int(0)
-*** Done ***
diff --git a/ext/standard/tests/file/fwrite_variation-win32.phpt b/ext/standard/tests/file/fwrite_variation-win32.phpt
deleted file mode 100644 (file)
index d3c456f..0000000
+++ /dev/null
@@ -1,1008 +0,0 @@
---TEST--
-Test fwrite() function : usage variations
---SKIPIF--
-<?php
-if( substr(PHP_OS, 0, 3) != 'WIN' ) {
-   die('skip...Not valid for Linux');
-}
-?>
---FILE--
-<?php
-/*
- Prototype: int fwrite ( resource $handle,string string, [, int $length] );
- Description: fwrite() writes the contents of string to the file stream pointed to by handle.
-              If the length arquement is given,writing will stop after length bytes have been
-              written or the end of string reached, whichever comes first.
-              fwrite() returns the number of bytes written or FALSE on error
-*/
-
-
-echo "*** Testing fwrite() various  operations ***\n";
-
-// include the file.inc for Function: function delete_file($filename)
-include ("file.inc");
-
-/*
- Test fwrite with file opened in mode : a,ab,at,a+,a+b,a+t,r,rb,rt,r+,r+b,r+t
- File having content of type numeric, text,text_with_new_line & alphanumeric
-*/
-
-$file_modes = array("r","rb","rt","r+", "r+b", "r+t","a","ab","at","a+","a+b",
-                    "a+t","x","xb","xt","x+","x+b","x+t");
-$file_content_types = array("numeric","text","text_with_new_line","alphanumeric");
-
-
-foreach($file_content_types as $file_content_type) {
-  echo "\n-- Testing fwrite() with file having content of type ". $file_content_type ." --\n";
-
-  /* open the file using $files_modes and perform fwrite() on it */
-  foreach($file_modes as $file_mode) {
-    echo "-- Opening file in $file_mode --\n";
-
-    $filename = dirname(__FILE__)."/fwrite_variation-win321.tmp"; // this is name of the file
-    if ( ! strstr( $file_mode, "x" ) ) {
-      create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation-win32");
-    }
-
-    $file_handle = fopen($filename, $file_mode);
-    if(!$file_handle) {
-      echo "Error: failed to fopen() file: $filename!";
-      exit();
-    }
-
-    $data_to_be_written="";
-    fill_buffer($data_to_be_written,$file_content_type,1024);  //get the data of size 1024
-
-    /*  Write the in to the file, verify it by checking the file pointer position, eof position, 
-        filesize & by displaying the content */
-    switch($file_mode) {
-      case "r":
-      case "rb":
-      case "rt":
-        var_dump( ftell($file_handle) );  // expected: 0
-        var_dump( fwrite($file_handle, $data_to_be_written )); 
-        var_dump( ftell($file_handle) );  // expected: 0
-        var_dump( feof($file_handle) );  // expected: false 
-  
-        // move the file pointer to end of the file and try fwrite()
-        fseek($file_handle, SEEK_END, 0);
-        var_dump( ftell($file_handle) );  // expecting 1024
-        var_dump( fwrite($file_handle, $data_to_be_written) ); // fwrite to fail
-        var_dump( ftell($file_handle) );  //check that file pointer points at eof, expected: 1024
-        var_dump( feof($file_handle) );  // ensure that  feof() points to eof, expected: true
-
-       // ensure that file content/size didn't change.
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );  // expected: 1024
-        var_dump(md5(file_get_contents($filename))); // hash the output
-       delete_file($filename); // delete file with name fwrite_variation1.tmp
-       break;
-
-      case "r+b":
-      case "r+":
-      case "r+t":
-        /*overwrite first 400 bytes in the file*/
-        var_dump( ftell($file_handle) );  // expected : 0
-        var_dump( fwrite($file_handle, $data_to_be_written, 400));
-        var_dump( ftell($file_handle) );  // expected: 400
-        var_dump( feof($file_handle) );  //Expecting bool(false)
-
-       /*overwrite data in middle of the file*/
-        fseek($file_handle, SEEK_SET, 1024/2 ); 
-       var_dump( ftell($file_handle));  // expected: 1024/2
-       var_dump( fwrite($file_handle, $data_to_be_written, 200) );
-        var_dump( ftell($file_handle) );
-       var_dump( feof($file_handle) );  //Expecting bool(false)
-
-        /* write at the end of the file */
-        fseek($file_handle, SEEK_END, 0); 
-       var_dump( ftell($file_handle) );  // expected: 1024
-        var_dump( feof($file_handle) );
-       var_dump( fwrite($file_handle, $data_to_be_written, 200) );
-        var_dump( ftell($file_handle) );
-       var_dump( feof($file_handle) );  //Expecting bool(false)
-
-       /* display the file content, check the file size  */
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );
-        var_dump(md5(file_get_contents($filename)));
-        delete_file($filename); // delete file with name fwrite_variation1.tmp
-        break;
-
-      case "a":
-      case "ab":
-      case "at":
-      case "a+":
-      case "a+b":
-      case "a+t":
-        // append the data to the file, starting from current position of the file pointer
-        var_dump( ftell($file_handle) ); // expected: 1024
-        var_dump( fwrite($file_handle,$data_to_be_written,400) );
-        var_dump( ftell($file_handle) ); // expected: 1024 + 400
-        var_dump( feof($file_handle) );  // expected : true
-
-        /*overwrite data in middle of the file*/
-        fseek($file_handle, SEEK_SET, (1024 + 400)/2 );
-        var_dump( ftell($file_handle));  // expected: (1024 + 400)/2
-        var_dump( fwrite($file_handle, $data_to_be_written, 200) );
-        var_dump( ftell($file_handle) ); 
-        var_dump( feof($file_handle) );  //Expecting bool(false)
-        
-        /* check the filesize and display file content */
-        // close the file, get the size and content of the file.
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );
-        var_dump(md5(file_get_contents($filename)));
-        // delete the file created
-        delete_file($filename); // delete file with name fwrite_variation.tmp
-        break;
-
-      case "x":
-      case "xb":
-      case "xt":
-      case "x+":
-      case "x+b":
-      case "x+t":
-        // write data to the file
-        var_dump( ftell($file_handle) );
-        var_dump( fwrite($file_handle,$data_to_be_written,400));
-        var_dump( ftell($file_handle) );
-        var_dump( feof($file_handle) );  // expected: true
-
-        //check the filesize and content
-        // close the file, get the size and content of the file.
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );
-        var_dump(md5(file_get_contents($filename)));
-        // delete the file created
-        delete_file($filename); // delete file with name fwrite_variation.tmp
-        break;
-    } //end of switch
-  } // end of inner foreach loop
-} // end of outer foreach loop
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing fwrite() various  operations ***
-
--- Testing fwrite() with file having content of type numeric --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
-
--- Testing fwrite() with file having content of type text --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "e486000c4c8452774f746a27658d87fa"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "e486000c4c8452774f746a27658d87fa"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "e486000c4c8452774f746a27658d87fa"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3bdaf80dae28bc24bb304daa5ffee16c"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3bdaf80dae28bc24bb304daa5ffee16c"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3bdaf80dae28bc24bb304daa5ffee16c"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
-
--- Testing fwrite() with file having content of type text_with_new_line --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b09c8026a64a88d36d4c2f17983964bb"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b09c8026a64a88d36d4c2f17983964bb"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b09c8026a64a88d36d4c2f17983964bb"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b188d7c8aa229cbef067e5970f2daba9"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b188d7c8aa229cbef067e5970f2daba9"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "991652c76db8d17c790c702ac0a6dc5f"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1690)
-string(32) "656648355b64df6fded53b12fb355ab8"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1690)
-string(32) "656648355b64df6fded53b12fb355ab8"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(444)
-string(32) "c96531f6b4c8d9e829c25b87f96ea86e"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(444)
-string(32) "c96531f6b4c8d9e829c25b87f96ea86e"
-
--- Testing fwrite() with file having content of type alphanumeric --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "5d4ec23a3d9dd447e2f702d9e0e114d9"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "5d4ec23a3d9dd447e2f702d9e0e114d9"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "5d4ec23a3d9dd447e2f702d9e0e114d9"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
-Done
\ No newline at end of file
diff --git a/ext/standard/tests/file/fwrite_variation.phpt b/ext/standard/tests/file/fwrite_variation.phpt
deleted file mode 100644 (file)
index 87bbf47..0000000
+++ /dev/null
@@ -1,1008 +0,0 @@
---TEST--
-Test fwrite() function : usage variations
---SKIPIF--
-<?php
-if( substr(PHP_OS, 0, 3) == 'WIN' ) {
-   die('skip...Not valid for Windows');
-}
-?>
---FILE--
-<?php
-/*
- Prototype: int fwrite ( resource $handle,string string, [, int $length] );
- Description: fwrite() writes the contents of string to the file stream pointed to by handle.
-              If the length arquement is given,writing will stop after length bytes have been
-              written or the end of string reached, whichever comes first.
-              fwrite() returns the number of bytes written or FALSE on error
-*/
-
-
-echo "*** Testing fwrite() various  operations ***\n";
-
-// include the file.inc for Function: function delete_file($filename)
-include ("file.inc");
-
-/*
- Test fwrite with file opened in mode : a,ab,at,a+,a+b,a+t,r,rb,rt,r+,r+b,r+t
- File having content of type numeric, text,text_with_new_line & alphanumeric
-*/
-
-$file_modes = array("r","rb","rt","r+", "r+b", "r+t","a","ab","at","a+","a+b",
-                    "a+t","x","xb","xt","x+","x+b","x+t");
-$file_content_types = array("numeric","text","text_with_new_line","alphanumeric");
-
-
-foreach($file_content_types as $file_content_type) {
-  echo "\n-- Testing fwrite() with file having content of type ". $file_content_type ." --\n";
-
-  /* open the file using $files_modes and perform fwrite() on it */
-  foreach($file_modes as $file_mode) {
-    echo "-- Opening file in $file_mode --\n";
-
-    $filename = dirname(__FILE__)."/fwrite_variation1.tmp"; // this is name of the file
-    if ( ! strstr( $file_mode, "x" ) ) {
-      create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation");
-    }
-
-    $file_handle = fopen($filename, $file_mode);
-    if(!$file_handle) {
-      echo "Error: failed to fopen() file: $filename!";
-      exit();
-    }
-
-    $data_to_be_written="";
-    fill_buffer($data_to_be_written,$file_content_type,1024);  //get the data of size 1024
-
-    /*  Write the in to the file, verify it by checking the file pointer position, eof position, 
-        filesize & by displaying the content */
-    switch($file_mode) {
-      case "r":
-      case "rb":
-      case "rt":
-        var_dump( ftell($file_handle) );  // expected: 0
-        var_dump( fwrite($file_handle, $data_to_be_written )); 
-        var_dump( ftell($file_handle) );  // expected: 0
-        var_dump( feof($file_handle) );  // expected: false 
-  
-        // move the file pointer to end of the file and try fwrite()
-        fseek($file_handle, SEEK_END, 0);
-        var_dump( ftell($file_handle) );  // expecting 1024
-        var_dump( fwrite($file_handle, $data_to_be_written) ); // fwrite to fail
-        var_dump( ftell($file_handle) );  //check that file pointer points at eof, expected: 1024
-        var_dump( feof($file_handle) );  // ensure that  feof() points to eof, expected: true
-
-       // ensure that file content/size didn't change.
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );  // expected: 1024
-        var_dump(md5(file_get_contents($filename))); // hash the output
-       delete_file($filename); // delete file with name fwrite_variation1.tmp
-       break;
-
-      case "r+b":
-      case "r+":
-      case "r+t":
-        /*overwrite first 400 bytes in the file*/
-        var_dump( ftell($file_handle) );  // expected : 0
-        var_dump( fwrite($file_handle, $data_to_be_written, 400));
-        var_dump( ftell($file_handle) );  // expected: 400
-        var_dump( feof($file_handle) );  //Expecting bool(false)
-
-       /*overwrite data in middle of the file*/
-        fseek($file_handle, SEEK_SET, 1024/2 ); 
-       var_dump( ftell($file_handle));  // expected: 1024/2
-       var_dump( fwrite($file_handle, $data_to_be_written, 200) );
-        var_dump( ftell($file_handle) );
-       var_dump( feof($file_handle) );  //Expecting bool(false)
-
-        /* write at the end of the file */
-        fseek($file_handle, SEEK_END, 0); 
-       var_dump( ftell($file_handle) );  // expected: 1024
-        var_dump( feof($file_handle) );
-       var_dump( fwrite($file_handle, $data_to_be_written, 200) );
-        var_dump( ftell($file_handle) );
-       var_dump( feof($file_handle) );  //Expecting bool(false)
-
-       /* display the file content, check the file size  */
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );
-        var_dump(md5(file_get_contents($filename)));
-        delete_file($filename); // delete file with name fwrite_variation1.tmp
-        break;
-
-      case "a":
-      case "ab":
-      case "at":
-      case "a+":
-      case "a+b":
-      case "a+t":
-        // append the data to the file, starting from current position of the file pointer
-        var_dump( ftell($file_handle) ); // expected: 1024
-        var_dump( fwrite($file_handle,$data_to_be_written,400) );
-        var_dump( ftell($file_handle) ); // expected: 1024 + 400
-        var_dump( feof($file_handle) );  // expected : true
-
-        /*overwrite data in middle of the file*/
-        fseek($file_handle, SEEK_SET, (1024 + 400)/2 );
-        var_dump( ftell($file_handle));  // expected: (1024 + 400)/2
-        var_dump( fwrite($file_handle, $data_to_be_written, 200) );
-        var_dump( ftell($file_handle) ); 
-        var_dump( feof($file_handle) );  //Expecting bool(false)
-        
-        /* check the filesize and display file content */
-        // close the file, get the size and content of the file.
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );
-        var_dump(md5(file_get_contents($filename)));
-        // delete the file created
-        delete_file($filename); // delete file with name fwrite_variation.tmp
-        break;
-
-      case "x":
-      case "xb":
-      case "xt":
-      case "x+":
-      case "x+b":
-      case "x+t":
-        // write data to the file
-        var_dump( ftell($file_handle) );
-        var_dump( fwrite($file_handle,$data_to_be_written,400));
-        var_dump( ftell($file_handle) );
-        var_dump( feof($file_handle) );  // expected: true
-
-        //check the filesize and content
-        // close the file, get the size and content of the file.
-        var_dump( fclose($file_handle) );
-        clearstatcache();//clears file status cache
-        var_dump( filesize($filename) );
-        var_dump(md5(file_get_contents($filename)));
-        // delete the file created
-        delete_file($filename); // delete file with name fwrite_variation.tmp
-        break;
-    } //end of switch
-  } // end of inner foreach loop
-} // end of outer foreach loop
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing fwrite() various  operations ***
-
--- Testing fwrite() with file having content of type numeric --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "950b7457d1deb6332f2fc5d42f3129d6"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "59ce5bf03b69069d00d6354bdc969ff6"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "f255efe87ebdf755e515868cea9ad24b"
-
--- Testing fwrite() with file having content of type text --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "e486000c4c8452774f746a27658d87fa"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "e486000c4c8452774f746a27658d87fa"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "e486000c4c8452774f746a27658d87fa"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3bdaf80dae28bc24bb304daa5ffee16c"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3bdaf80dae28bc24bb304daa5ffee16c"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3bdaf80dae28bc24bb304daa5ffee16c"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "dbd9dffd809d82e299bc1e5c55087f3b"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "c2244282eeca7c2d32d0dacf21e19432"
-
--- Testing fwrite() with file having content of type text_with_new_line --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b09c8026a64a88d36d4c2f17983964bb"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b09c8026a64a88d36d4c2f17983964bb"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b09c8026a64a88d36d4c2f17983964bb"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b188d7c8aa229cbef067e5970f2daba9"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b188d7c8aa229cbef067e5970f2daba9"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "b188d7c8aa229cbef067e5970f2daba9"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "3f0a483fe8a2f405677844e0b1af6cf4"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "fa6c79b925c2fc754b9d063c6de1d8df"
-
--- Testing fwrite() with file having content of type alphanumeric --
--- Opening file in r --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
--- Opening file in rb --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
--- Opening file in rt --
-int(0)
-int(0)
-int(0)
-bool(false)
-int(2)
-int(0)
-int(2)
-bool(false)
-bool(true)
-int(1024)
-string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
--- Opening file in r+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "5d4ec23a3d9dd447e2f702d9e0e114d9"
--- Opening file in r+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "5d4ec23a3d9dd447e2f702d9e0e114d9"
--- Opening file in r+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-int(2)
-bool(false)
-int(200)
-int(202)
-bool(false)
-bool(true)
-int(1024)
-string(32) "5d4ec23a3d9dd447e2f702d9e0e114d9"
--- Opening file in a --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in ab --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in at --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in a+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in a+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in a+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-int(400)
-int(200)
-int(600)
-bool(false)
-bool(true)
-int(1624)
-string(32) "ea0c0bfa0b10aa8e614fd33ffe295cb9"
--- Opening file in x --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in xb --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in xt --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in x+ --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in x+b --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
--- Opening file in x+t --
-int(0)
-int(400)
-int(400)
-bool(false)
-bool(true)
-int(400)
-string(32) "b2a123e1d84e6a03c8520aff7689219e"
-Done
diff --git a/ext/standard/tests/file/is_executable_variation.phpt b/ext/standard/tests/file/is_executable_variation.phpt
deleted file mode 100644 (file)
index 9e4a32c..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
---TEST--
-Test is_executable() function: usage variations
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip.. only for LINUX');
-}
-// Skip if being run by root (files are always readable, writeable and executable)
-$filename = dirname(__FILE__)."/is_readable_root_check.tmp";
-$fp = fopen($filename, 'w');
-fclose($fp);
-if(fileowner($filename) == 0) {
-       unlink ($filename);
-       die('skip...cannot be run as root\n');
-}
-
-unlink($filename);
-?>
---FILE--
-<?php
-/* Prototype: bool is_executable ( string $filename );
-   Description: Tells whether the filename is executable
-*/
-
-require dirname(__FILE__).'/file.inc';
-echo "*** Testing is_executable(): usage variations ***\n";
-
-$file_path = dirname(__FILE__);
-mkdir("$file_path/is_executable");
-
-// create a new temporary file
-$fp = fopen("$file_path/is_executable/bar.tmp", "w");
-fclose($fp);
-
-/* array of files checked to see if they are executable files
-   using is_executable() function */
-$files_arr = array(
-  "$file_path/is_executable/bar.tmp",
-
-  /* Testing a file with trailing slash */
-  "$file_path/is_executable/bar.tmp/",
-
-  /* Testing file with double slashes */
-  "$file_path/is_executable//bar.tmp",
-  "$file_path/is_executable/*.tmp",
-  "$file_path/is_executable/b*.tmp", 
-
-  /* Testing Binary safe */
-  "$file_path/is_executable".chr(0)."bar.temp",
-  "$file_path".chr(0)."is_executable/bar.temp",
-  "$file_path/is_executablex000/",
-  
-  /* Testing directories */
-  ".",  // current directory, exp: bool(true)
-  "$file_path/is_executable"  // temp directory, exp: bool(true)
-);
-$counter = 1;
-/* loop through to test each element in the above array 
-   is an executable file */
-foreach($files_arr as $file) {
-  echo "-- Iteration $counter --\n";
-  var_dump( is_executable($file) );
-  $counter++;
-  clearstatcache();
-}
-
-echo "\n*** Testing is_executable() on directory without execute permission ***\n";
-chmod("$file_path/is_executable", 0444);
-var_dump( is_executable("$file_path/is_executable") );  // exp: bool(false)
-chmod("$file_path/is_executable", 0777);  // chmod to enable deletion of directory
-
-echo "\n*** Testing miscelleneous input for is_executable() function ***\n";
-$name_prefix = "is_executable";
-create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1);
-create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2);
-create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3);
-create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 4);
-create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5);
-create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6);
-create_files(dirname(__FILE__), 1, "text", 0714, 1, "w", $name_prefix, 7);
-create_files(dirname(__FILE__), 1, "numeric", 0744, 1, "w", $name_prefix, 8);
-create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9);
-create_files(dirname(__FILE__), 1, "text", 0712, 1, "w", $name_prefix, 10);
-
-$files = array (
-  "$file_path/is_executable1.tmp",
-  "$file_path/is_executable2.tmp",
-  "$file_path/is_executable3.tmp",
-  "$file_path/is_executable4.tmp",
-  "$file_path/is_executable5.tmp",
-  "$file_path/is_executable6.tmp",
-  "$file_path/is_executable7.tmp",
-  "$file_path/is_executable8.tmp",
-  "$file_path/is_executable9.tmp",
-  "$file_path/is_executable10.tmp",
-);
-$counter = 1;
-/* loop through to test each element in the above array
-   is an executable file */
-foreach($files as $file) {
-  echo "-- Iteration $counter --\n";
-  var_dump( is_executable($file) );
-  $counter++;
-  clearstatcache();
-}
-
-// change all file's permissions to 777 before deleting
-change_file_perms($file_path, 10, 0777, $name_prefix);
-delete_files($file_path, 10, $name_prefix);
-
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle);
-
-echo "\n*** Testing is_executable() on invalid files ***\n";
-$invalid_files = array(
-  0,
-  1234,
-  -2.34555,
-  "string",
-  TRUE,
-  FALSE,
-  NULL,
-  @array(),
-  @$file_handle
-);
-/* loop through to test each element in the above array 
-   is an executable file */
-foreach( $invalid_files as $invalid_file ) {
-  var_dump( is_executable($invalid_file) );
-  clearstatcache();
-}
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-unlink(dirname(__FILE__)."/is_executable/bar.tmp");
-rmdir(dirname(__FILE__)."/is_executable/");
-?>
---EXPECTF--
-*** Testing is_executable(): usage variations ***
--- Iteration 1 --
-bool(false)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-bool(false)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(true)
--- Iteration 7 --
-bool(true)
--- Iteration 8 --
-bool(false)
--- Iteration 9 --
-bool(true)
--- Iteration 10 --
-bool(true)
-
-*** Testing is_executable() on directory without execute permission ***
-bool(false)
-
-*** Testing miscelleneous input for is_executable() function ***
--- Iteration 1 --
-bool(true)
--- Iteration 2 --
-bool(true)
--- Iteration 3 --
-bool(true)
--- Iteration 4 --
-bool(true)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(true)
--- Iteration 7 --
-bool(true)
--- Iteration 8 --
-bool(true)
--- Iteration 9 --
-bool(false)
--- Iteration 10 --
-bool(true)
-
-*** Testing is_executable() on invalid files ***
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-
-Notice: Array to string conversion in %s on line %d
-bool(false)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/is_readable_variation.phpt b/ext/standard/tests/file/is_readable_variation.phpt
deleted file mode 100644 (file)
index ee4a51d..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
---TEST--
-Test is_readable() function: usage variations
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip.. only for LINUX');
-}
-// Skip if being run by root (files are always readable, writeable and executable)
-$filename = dirname(__FILE__)."/is_readable_root_check.tmp";
-$fp = fopen($filename, 'w');
-fclose($fp);
-if(fileowner($filename) == 0) {
-       unlink ($filename);
-       die('skip...cannot be run as root\n');
-}
-
-unlink($filename);
-?>
---FILE--
-<?php
-/* Prototype: bool is_readable ( string $filename );
-   Description: Tells whether the filename is readable.
-*/
-
-require dirname(__FILE__).'/file.inc';
-echo "*** Testing is_readable(): usage variations ***\n";
-
-$file_path = dirname(__FILE__);
-mkdir("$file_path/is_readable");
-
-// create a new temporary file
-$fp = fopen("$file_path/is_readable/bar.tmp", "w");
-fclose($fp);
-
-/* array of files to be tested if they are readable by using
-   is_readable() function */
-$files_arr = array(
-  "$file_path/is_readable/bar.tmp",
-
-  /* Testing a file trailing slash */
-  "$file_path/is_readable/bar.tmp/",
-
-  /* Testing file with double slashes */
-  "$file_path/is_readable//bar.tmp",
-  "$file_path//is_readable//bar.tmp",
-  "$file_path/is_readable/*.tmp",
-  "$file_path/is_readable/b*.tmp", 
-
-  /* Testing Binary safe */
-  "$file_path/is_readable".chr(0)."bar.tmp",
-  "$file_path".chr(0)."is_readable/bar.tmp",
-  "$file_path".chr(0)."is_readable/bar.tmp",
-  
-  /* Testing directories */
-  ".",  // current directory, exp: bool(true)
-  "$file_path/is_readable"  // temp directory, exp: bool(true)
-);
-$counter = 1;
-/* loop through to test each element in the above array 
-   is a writable file */
-foreach($files_arr as $file) {
-  echo "-- Iteration $counter --\n";
-  var_dump( is_readable($file) );
-  $counter++;
-  clearstatcache();
-}
-
-echo "\n*** Testing is_readable() on directory without read permission ***\n";
-chmod("$file_path/is_readable", 0001);
-var_dump( is_readable("$file_path/is_readable") );  // exp: bool(false)
-chmod("$file_path/is_readable", 0777);  // chmod to enable deletion of directory
-
-echo "\n*** Testing miscelleneous input for is_readable() function ***\n";
-$name_prefix = "is_readable";
-create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1);
-create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2);
-create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3);
-create_files(dirname(__FILE__), 1, "numeric", 0555, 1, "w", $name_prefix, 4);
-create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5);
-create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6);
-create_files(dirname(__FILE__), 1, "text", 0411, 1, "w", $name_prefix, 7);
-create_files(dirname(__FILE__), 1, "numeric", 0444, 1, "w", $name_prefix, 8);
-create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9);
-create_files(dirname(__FILE__), 1, "text", 0422, 1, "w", $name_prefix, 10);
-
-$files = array (
-  "$file_path/is_readable1.tmp",
-  "$file_path/is_readable2.tmp",
-  "$file_path/is_readable3.tmp",
-  "$file_path/is_readable4.tmp",
-  "$file_path/is_readable5.tmp",
-  "$file_path/is_readable6.tmp",
-  "$file_path/is_readable7.tmp",
-  "$file_path/is_readable8.tmp",
-  "$file_path/is_readable9.tmp",
-  "$file_path/is_readable10.tmp"
-);
-$counter = 1;
-/* loop through to test each element in the above array
-   is a readable file */
-foreach($files as $file) {
-  echo "-- Iteration $counter --\n";
-  var_dump( is_readable($file) );
-  $counter++;
-  clearstatcache();
-}
-
-// change all file's permissions to 777 before deleting
-change_file_perms($file_path, 10, 0777, $name_prefix);
-delete_files($file_path, 10, $name_prefix);
-
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle);
-
-echo "\n*** Testing is_readable() on miscelleneous filenames ***\n";
-$misc_files = array(
-  0,
-  1234,
-  -2.34555,
-  "string",
-  TRUE,
-  FALSE,
-  NULL,
-  @array(),
-  @$file_handle
-);
-/* loop through to test each element in the above array 
-   is a readable file */
-foreach( $misc_files as $misc_file ) {
-  var_dump( is_readable($misc_file) );
-  clearstatcache();
-}
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-unlink(dirname(__FILE__)."/is_readable/bar.tmp");
-rmdir(dirname(__FILE__)."/is_readable/");
-?>
---EXPECTF--
-*** Testing is_readable(): usage variations ***
--- Iteration 1 --
-bool(true)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-bool(true)
--- Iteration 4 --
-bool(true)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(false)
--- Iteration 7 --
-bool(true)
--- Iteration 8 --
-bool(true)
--- Iteration 9 --
-bool(true)
--- Iteration 10 --
-bool(true)
--- Iteration 11 --
-bool(true)
-
-*** Testing is_readable() on directory without read permission ***
-bool(false)
-
-*** Testing miscelleneous input for is_readable() function ***
--- Iteration 1 --
-bool(true)
--- Iteration 2 --
-bool(true)
--- Iteration 3 --
-bool(true)
--- Iteration 4 --
-bool(true)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(true)
--- Iteration 7 --
-bool(true)
--- Iteration 8 --
-bool(true)
--- Iteration 9 --
-bool(true)
--- Iteration 10 --
-bool(true)
-
-*** Testing is_readable() on miscelleneous filenames ***
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-
-Notice: Array to string conversion in %s on line %d
-bool(false)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/is_writable_variation.phpt b/ext/standard/tests/file/is_writable_variation.phpt
deleted file mode 100644 (file)
index e46aaa3..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
---TEST--
-Test is_writable() and its alias is_writeable() function: usage variations
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip.. only on LINUX');
-} 
-// Skip if being run by root (files are always readable, writeable and executable)
-$filename = dirname(__FILE__)."/is_readable_root_check.tmp";
-$fp = fopen($filename, 'w');
-fclose($fp);
-if(fileowner($filename) == 0) {
-       unlink ($filename);
-       die('skip...cannot be run as root\n');
-}
-
-unlink($filename);
-?>
---FILE--
-<?php
-/* Prototype: bool is_writable ( string $filename );
-   Description: Tells whether the filename is writable.
-
-   is_writeable() is an alias of is_writable()
-*/
-
-require dirname(__FILE__).'/file.inc';
-echo "*** Testing is_writable(): usage variations ***\n";
-
-$file_path = dirname(__FILE__);
-mkdir("$file_path/is_writable");
-
-// create a new temporary file
-$fp = fopen("$file_path/is_writable/bar.tmp", "w");
-fclose($fp);
-
-/* array of files to be tested to check if they are writable
-   using is_writable() function */
-$files_arr = array(
-  "$file_path/is_writable/bar.tmp",
-
-  /* Testing a file trailing slash */
-  "$file_path/is_writable/bar.tmp/",
-
-  /* Testing file with double slashes */
-  "$file_path/is_writable//bar.tmp",
-  "$file_path//is_writable//bar.tmp",
-  "$file_path/is_writable/*.tmp",
-  "$file_path/is_writable/b*.tmp", 
-
-  /* Testing Binary safe */
-  "$file_path/is_writable".chr(0)."bar.tmp",
-  "$file_path".chr(0)."is_writable/bar.tmp",
-  "$file_path".chr(0)."is_writable/bar.tmp",
-  
-  /* Testing directories */
-  ".",  // current directory, exp: bool(true)
-  "$file_path/is_writable"  // temp directory, exp: bool(true)
-);
-$counter = 1;
-/* loop through to test each element in the above array 
-   is a writable file */
-foreach($files_arr as $file) {
-  echo "-- Iteration $counter --\n";
-  var_dump( is_writable($file) );
-  var_dump( is_writeable($file) );
-  $counter++;
-  clearstatcache();
-}
-
-echo "\n*** Testing is_writable() on directory without write permission ***\n";
-chmod("$file_path/is_writable", 0004);
-var_dump( is_writable("$file_path/is_writable") );  // exp: bool(false)
-var_dump( is_writeable("$file_path/is_writable") );  // exp: bool(false)
-chmod("$file_path/is_writable", 0777);  // chmod to enable deletion of directory
-
-echo "\n*** Testing miscelleneous input for is_writable() function ***\n";
-$name_prefix = "is_writable";
-create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1);
-create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2);
-create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3);
-create_files(dirname(__FILE__), 1, "numeric", 0555, 1, "w", $name_prefix, 4);
-create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5);
-create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6);
-create_files(dirname(__FILE__), 1, "text", 0114, 1, "w", $name_prefix, 7);
-create_files(dirname(__FILE__), 1, "numeric", 0244, 1, "w", $name_prefix, 8);
-create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9);
-create_files(dirname(__FILE__), 1, "text", 0422, 1, "w", $name_prefix, 10);
-
-$misc_files = array (
-  "$file_path/is_writable1.tmp",
-  "$file_path/is_writable2.tmp",
-  "$file_path/is_writable3.tmp",
-  "$file_path/is_writable4.tmp",
-  "$file_path/is_writable5.tmp",
-  "$file_path/is_writable6.tmp",
-  "$file_path/is_writable7.tmp",
-  "$file_path/is_writable8.tmp",
-  "$file_path/is_writable9.tmp",
-  "$file_path/is_writable10.tmp"
-);
-
-$counter = 1;
-/* loop through to test each element in the above array
-   is a writable file */
-foreach($misc_files as $misc_file) {
-  echo "-- Iteration $counter --\n";
-  var_dump( is_writable($misc_file) );
-  var_dump( is_writeable($misc_file) );
-  $counter++;
-  clearstatcache();
-}
-
-// change all file's permissions to 777 before deleting
-change_file_perms($file_path, 10, 0777, $name_prefix);
-delete_files($file_path, 10, $name_prefix);
-
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle);
-
-clearstatcache();
-echo "\n*** Testing is_writable() on miscelleneous filenames ***\n";
-$misc_files = array(
-  0,
-  1234,
-  -2.34555,
-  "string",
-  TRUE,
-  FALSE,
-  NULL,
-  @array(),
-  @$file_handle
-);
-/* loop through to test each element in the above array 
-   is a writable file */
-foreach( $misc_files as $misc_file ) {
-  var_dump( is_writable($misc_file) );
-  var_dump( is_writeable($misc_file) );
-  clearstatcache();
-}
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-unlink(dirname(__FILE__)."/is_writable/bar.tmp");
-rmdir(dirname(__FILE__)."/is_writable/");
-?>
---EXPECTF--
-*** Testing is_writable(): usage variations ***
--- Iteration 1 --
-bool(true)
-bool(true)
--- Iteration 2 --
-bool(false)
-bool(false)
--- Iteration 3 --
-bool(true)
-bool(true)
--- Iteration 4 --
-bool(true)
-bool(true)
--- Iteration 5 --
-bool(false)
-bool(false)
--- Iteration 6 --
-bool(false)
-bool(false)
--- Iteration 7 --
-bool(true)
-bool(true)
--- Iteration 8 --
-bool(true)
-bool(true)
--- Iteration 9 --
-bool(true)
-bool(true)
--- Iteration 10 --
-bool(true)
-bool(true)
--- Iteration 11 --
-bool(true)
-bool(true)
-
-*** Testing is_writable() on directory without write permission ***
-bool(false)
-bool(false)
-
-*** Testing miscelleneous input for is_writable() function ***
--- Iteration 1 --
-bool(true)
-bool(true)
--- Iteration 2 --
-bool(true)
-bool(true)
--- Iteration 3 --
-bool(true)
-bool(true)
--- Iteration 4 --
-bool(false)
-bool(false)
--- Iteration 5 --
-bool(true)
-bool(true)
--- Iteration 6 --
-bool(true)
-bool(true)
--- Iteration 7 --
-bool(false)
-bool(false)
--- Iteration 8 --
-bool(true)
-bool(true)
--- Iteration 9 --
-bool(false)
-bool(false)
--- Iteration 10 --
-bool(false)
-bool(false)
-
-*** Testing is_writable() on miscelleneous filenames ***
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-
-Notice: Array to string conversion in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %s on line %d
-bool(false)
-bool(false)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic.phpt
deleted file mode 100644 (file)
index c01a11b..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
---TEST--
-Test symlink(), linkinfo(), link() and is_link() functions: basic functionality
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip no symlinks on Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype: bool symlink ( string $target, string $link );
-   Description: creates a symbolic link to the existing target with the specified name link
-
-   Prototype: bool is_link ( string $filename );
-   Description: Tells whether the given file is a symbolic link.
-
-   Prototype: bool link ( string $target, string $link );
-   Description: Create a hard link
-
-   Prototype: int linkinfo ( string $path );
-   Description: Gets information about a link
-*/
-
-$file_path = dirname(__FILE__);
-
-// temp dir created in present working directory
-$dirname = "symlink_linkinfo_link_is_link";
-mkdir("$file_path/$dirname");  // creating temp dir
-
-/* Creating soft/hard link to $filename created in temp directory $dirname
-   and checking linkinfo() and is_link() on the link created */
-
-echo "*** Testing symlink(), linkinfo(), link() and is_link() : basic functionality ***\n";
-
-// creating file in $dirname, links are created to the this file
-$filename = "$file_path/$dirname/symlink_is_link_linkinfo_link.tmp";
-$filename = fopen($filename, "w");
-fclose($filename);
-
-// name of the soft link created to $filename
-$sym_linkname = "$file_path/$dirname/symlink_linkinfo_link_is_link_softlink.tmp";
-
-// name of the hard link created to $filename
-$linkname = "$file_path/$dirname/symlink_linkinfo_link_is_link_hardlink.tmp";
-
-// filename stored in array with single and double slash notation in its path
-$files = array (
-  "$file_path/$dirname/symlink_is_link_linkinfo_link.tmp",
-  "$file_path//$dirname//symlink_is_link_linkinfo_link.tmp"
-);
-
-$counter = 1;
-/* create soft/hard link to  the file 
-   and check linkinfo() and is_link() on the link created */
-foreach($files as $file) {
-  echo "\n-- Iteration $counter --\n";
-  echo "-- Testing on soft links --\n";
-  // create soft link
-  var_dump( symlink($file, $sym_linkname) );
-  // checking information of link with linkinfo()
-  var_dump( linkinfo($sym_linkname) );
-  // checking if given file is soft link
-  var_dump( is_link($sym_linkname) );
-  // clear the cache
-  clearstatcache();
-
-  // testing on hard link
-  echo "-- Testing on hard links --\n";
-  // creating hard link
-  var_dump( link($file, $linkname) );
-  // checking information of link with linkinfo()
-  var_dump( linkinfo($linkname) );
-  // checking if given link is soft link; expected: false
-  var_dump( is_link($linkname) );
-  // clear the cache
-  clearstatcache();
-
-  // deleting the links
-  unlink($sym_linkname);
-  unlink($linkname);
-  $counter++;
-}
-
-/* Creating soft/hard link to the temporary dir $dirname and checking
-   linkinfo() and is_link() on the link created to $dirname */
-
-$dirname = "symlink_linkinfo_link_is_link";
-echo "\n*** Testing symlink(), linkinfo(), link() and is_link() on directory ***\n";
-
-// name of the soft link created to $dirname
-$sym_linkname = "$file_path/$dirname/symlink_linkinfo_link_is_link_softlink.tmp";
-
-// name of the hard link created to $dirname
-$linkname = "$file_path/$dirname/symlink_linkinfo_link_is_link_hardlink.tmp";
-
-// testing on soft link
-echo "\n-- Testing on soft links --\n";
-// creating soft link to $dirname
-var_dump( symlink("$file_path/$dirname", $sym_linkname) ); // this works, expected true
-// gets information about soft link created to directory; expected: true
-var_dump( linkinfo($sym_linkname) );
-// checks if link created is soft link; expected: true
-var_dump( is_link($sym_linkname) );
-// clear the cache
-clearstatcache();
-
-// testing on hard link
-echo "\n-- Testing on hard links --\n";
-// creating hard link to $dirname; expected: false
-var_dump( link("$file_path/$dirname", $linkname) ); // this doesn't work, expected false
-var_dump( linkinfo($linkname) ); // link doesn't exists as not created, expected false
-var_dump( is_link($linkname) ); // link doesn't exists as not created, expected false
-// clear the cache
-clearstatcache();
-
-// deleting the links
-unlink($sym_linkname);
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-$dirname = dirname(__FILE__)."/symlink_linkinfo_link_is_link";
-unlink("$dirname/symlink_is_link_linkinfo_link.tmp");
-rmdir($dirname);
-?>
---EXPECTF--
-*** Testing symlink(), linkinfo(), link() and is_link() : basic functionality ***
-
--- Iteration 1 --
--- Testing on soft links --
-bool(true)
-int(%d)
-bool(true)
--- Testing on hard links --
-bool(true)
-int(%d)
-bool(false)
-
--- Iteration 2 --
--- Testing on soft links --
-bool(true)
-int(%d)
-bool(true)
--- Testing on hard links --
-bool(true)
-int(%d)
-bool(false)
-
-*** Testing symlink(), linkinfo(), link() and is_link() on directory ***
-
--- Testing on soft links --
-bool(true)
-int(%d)
-bool(true)
-
--- Testing on hard links --
-
-Warning: link(): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: linkinfo(): No such file or directory in %s on line %d
-int(-1)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error.phpt
deleted file mode 100644 (file)
index 68b6e64..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
---TEST--
-Test symlink(), linkinfo(), link() and is_link() functions : error conditions
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip no symlinks on Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype: bool symlink ( string $target, string $link );
-   Description: creates a symbolic link to the existing target with the specified name link
-
-   Prototype: bool is_link ( string $filename );
-   Description: Tells whether the given file is a symbolic link.
-
-   Prototype: bool link ( string $target, string $link );
-   Description: Create a hard link
-
-   Prototype: int linkinfo ( string $path );
-   Description: Gets information about a link
-*/
-
-// create temp $filename and create link $linkname to it
-$filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link.tmp";
-$fp = fopen($filename, "w");  // create temp file
-fclose($fp);
-
-// linkname used to create soft/hard link
-$linkname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_link.tmp";
-
-echo "*** Testing symlink() for error conditions ***\n";
-//zero arguments
-var_dump( symlink() );
-
-//more than expected
-var_dump( symlink($filename, $linkname, true) );
-
-//invalid arguments
-var_dump( symlink(NULL, $linkname) );  // NULL as filename
-var_dump( symlink('', $linkname) );  // empty string as filename
-var_dump( symlink(false, $linkname) );  // boolean false as filename
-var_dump( symlink($filename, NULL) );  // NULL as linkname
-var_dump( symlink($filename, '') );  // '' as linkname
-var_dump( symlink($filename, false) );  // false as linkname
-
-echo "\n*** Testing linkinfo() for error conditions ***\n";
-//zero arguments
-var_dump( linkinfo() );
-
-//more than expected
-var_dump( linkinfo($linkname, true) );
-
-//invalid arguments
-var_dump( linkinfo(NULL) );  // NULL as linkname
-var_dump( linkinfo('') );  // empty string as linkname
-var_dump( linkinfo(false) );  // boolean false as linkname
-
-echo "\n*** Testing link() for error conditions ***\n";
-//zero arguments
-var_dump( link() );
-
-//more than expected
-var_dump( link($filename, $linkname, false) );
-
-//invalid arguments
-var_dump( link(NULL, $linkname) );  // NULL as filename
-var_dump( link('', $linkname) );  // empty string as filename
-var_dump( link(false, $linkname) );  // boolean false as filename
-var_dump( link($filename, NULL) );  // NULL as linkname
-var_dump( link($filename, '') );  // '' as linkname
-var_dump( link($filename, false) );  // false as linkname
-
-echo "\n*** Testing is_link() for error conditions ***\n";
-//zero arguments
-var_dump( is_link() );
-
-//more than expected
-var_dump( is_link($linkname, "/") );
-
-//invalid arguments
-var_dump( is_link(NULL) );  // NULL as linkname
-var_dump( is_link('') );  // empty string as linkname
-var_dump( is_link(false) );  // boolean false as linkname
-var_dump( is_link($filename) );  // file given to is_link
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link.tmp");
-?>
---EXPECTF--
-*** Testing symlink() for error conditions ***
-
-Warning: Wrong parameter count for symlink() in %s on line %d
-NULL
-
-Warning: Wrong parameter count for symlink() in %s on line %d
-NULL
-
-Warning: symlink(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: symlink(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: symlink(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: symlink(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: symlink(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: symlink(): No such file or directory in %s on line %d
-bool(false)
-
-*** Testing linkinfo() for error conditions ***
-
-Warning: Wrong parameter count for linkinfo() in %s on line %d
-NULL
-
-Warning: Wrong parameter count for linkinfo() in %s on line %d
-NULL
-
-Warning: linkinfo(): No such file or directory in %s on line %d
-int(-1)
-
-Warning: linkinfo(): No such file or directory in %s on line %d
-int(-1)
-
-*** Testing link() for error conditions ***
-
-Warning: Wrong parameter count for link() in %s on line %d
-NULL
-
-Warning: Wrong parameter count for link() in %s on line %d
-NULL
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-*** Testing is_link() for error conditions ***
-
-Warning: Wrong parameter count for is_link() in %s on line %d
-NULL
-
-Warning: Wrong parameter count for is_link() in %s on line %d
-NULL
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-Done
diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation.phpt
deleted file mode 100644 (file)
index 2e02c5d..0000000
+++ /dev/null
@@ -1,773 +0,0 @@
---TEST--
-Test symlink(), linkinfo(), link() and is_link() functions : usage variations
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip no symlinks on Windows');
-}
-?>
---FILE--
-<?php
-/* Prototype: bool symlink ( string $target, string $link );
-   Description: creates a symbolic link to the existing target with the specified name link
-
-   Prototype: bool is_link ( string $filename );
-   Description: Tells whether the given file is a symbolic link.
-
-   Prototype: bool link ( string $target, string $link );
-   Description: Create a hard link
-
-   Prototype: int linkinfo ( string $path );
-   Description: Gets information about a link
-*/
-
-// creating temp directory which will contain temp file and links created 
-$file_path = dirname(__FILE__);
-$dirname = "$file_path/symlink_link_linkinfo_is_link/test/home";
-mkdir($dirname, 0777, true);
-
-// creating temp file; links are created to this file later on
-$filename = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link.tmp";
-$fp = fopen($filename, "w");
-fclose($fp);
-
-/* Variation 1 : Creating links across directories where linkname is stored as an object and array member */
-echo "*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members in an object ***\n";
-class object_temp {
-  var $linkname;
-  function object_temp($link) {
-    $this->linkname = $link;
-  }
-}
-
-$obj = new object_temp("$dirname/symlink_link_linkinfo_is_link_link.tmp");
-/* Testing on soft links */
-echo "\n-- Working with soft links --\n";
-// creating soft link
-var_dump( symlink($filename, $obj->linkname) );
-// check if the link exists
-var_dump( linkinfo($obj->linkname) );
-// check if link is soft link
-var_dump( is_link($obj->linkname) );
-// delete the link created
-unlink($obj->linkname);
-// clear the cache
-clearstatcache();
-
-/* Testing on hard links */
-echo "\n-- Working with hard links --\n";
-// creating hard link
-var_dump( link($filename, $obj->linkname) ); 
-// check if the link exists
-var_dump( linkinfo($obj->linkname) );
-// check if link is soft link; expected: false as the link is a hardlink
-var_dump( is_link($obj->linkname) ); 
-// delete the link created
-unlink($obj->linkname);
-// clear the cache
-clearstatcache();
-
-echo "\n*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members of an array ***\n";
-
-$link_arr = array("$dirname/symlink_link_linkinfo_is_link_link.tmp");
-
-/* Testing on soft links */
-echo "\n-- Working with soft links --\n";
-// creating soft link
-var_dump( symlink($filename, $link_arr[0]) );
-// check if the link exist
-var_dump( linkinfo($link_arr[0]) );
-// check if link is soft link
-var_dump( is_link($link_arr[0]) );
-// delete the link created
-unlink($link_arr[0]);
-// clear the cache
-clearstatcache();
-
-/* Testing on hard links */
-echo "\n-- Working with hard links --\n";
-// creating hard link
-var_dump( link($filename, $link_arr[0]) );
-// check if the link exist
-var_dump( linkinfo($link_arr[0]) );
-// check if link is soft link; expected: false as this is a hardlink
-var_dump( is_link($link_arr[0]) );
-// delete the links created
-unlink($link_arr[0]);
-// clear the cache
-clearstatcache();
-
-/* Variation 2 : Create hard link to non-existent file */
-// non-existing filename
-$non_existent_file = "$file_path/non_existent_file.tmp";
-// non-existing linkname
-$non_existent_linkname = "$file_path/non_existent_linkname.tmp";
-
-echo "\n*** Creating a hard link to a non-existent file ***\n";
-// creating hard link to non_existent file
-var_dump( link($non_existent_file, $non_existent_linkname) ); // expected false
-// checking linkinfo() and is_link() on the link; expected: false
-var_dump( linkinfo($non_existent_linkname) );
-var_dump( is_link($non_existent_linkname) );
-
-/* Variation 3 : Create file and a link to the file
-                 Access data of the file through the link 
-                 Update the file through link
-                 Check size of file and link
-*/
-
-echo "\n*** Accessing and updating data of file through soft link ***\n";
-// Creating file and inserting data into it
-$filename = "$file_path/symlink_link_is_link_linkinfo.tmp";
-
-// create temp file
-$file = fopen($filename, "w");
-
-// create soft link to file
-$linkname = "$file_path/symlink_is_link_linkinfo_link.tmp";
-var_dump( symlink($filename, $linkname) );
-// storing size of symlink in a local variable
-$link_stat = lstat($linkname);  // lstat of link
-$link_size = $link_stat[7];  // size of soft link
-
-// fill data into file
-fwrite($file, str_repeat("text", 20) );
-fclose($file);
-
-echo "\n-- Access data of the file through the soft link --\n";
-$data_from_link = file_get_contents($linkname);  // data read from $filename
-var_dump( $data_from_link );
-
-echo "\n-- Check size of soft link and file --\n";
-var_dump( filesize($filename) );
-var_dump( filesize($linkname) );
-
-// taking lstat of symlink
-$stat = lstat($linkname);
-// checking that size of symlink remains same
-if ($link_size == $stat[7])
-  echo "\nSoft link size remains same \n";
-else
-  echo "\nWarning: Soft link size has changed \n";
-
-echo "\n-- Updating file with data through soft link --\n";
-// append link with data
-$fp = fopen($linkname, "a");  // open in append mode
-fwrite($fp, "Hello World");
-fclose($fp);
-
-// now check temp file for data; it should append "Hello World"
-$data_from_file = file_get_contents($filename);
-var_dump( $data_from_file );
-
-echo "\n-- Check size of soft link and file --\n";
-var_dump( filesize($filename) );
-var_dump( filesize($linkname) );
-
-// taking lstat of symlink
-$stat = lstat($linkname);
-// checking that size of symlink remains same
-if ($link_size == $stat[7])
-  echo "\nSoft link size remains same \n";
-else
-  echo "\nWarning: Soft link size has changed \n";
-
-echo "\n-- Updating file with data and check data through soft link --\n";
-// write to temp file
-$file = fopen($filename, "w");
-fwrite($file, "Hello World");
-fclose($file);
-
-// now check link for data; it should echo "Hello World"
-$data_from_link = file_get_contents($linkname);
-var_dump( $data_from_link );
-
-echo "\n-- Check size of soft link and file --\n";
-var_dump( filesize($filename) );
-var_dump( filesize($linkname) );
-
-// taking lstat of symlink
-$stat = lstat($linkname);
-// checking that size of symlink remains same
-if ($link_size == $stat[7])
-  echo "\nSoft link size remains same \n";
-else
-  echo "\nWarning: Soft link size has changed \n";
-
-// delete the link
-unlink($linkname);
-// delete the temporary file
-unlink($filename);
-
-echo "\n*** Accessing and updating data of file through hard link ***\n";
-// Creating file and inserting data into it
-$filename = "$file_path/symlink_link_is_link_linkinfo.tmp";
-// create temp file
-$file = fopen($filename, "w");
-// fill data into file
-fwrite($file, str_repeat("text", 20) );
-fclose($file);
-
-echo "\n-- Access data of the file through the hard link --\n";
-// create hard link to file
-$linkname = "$file_path/symlink_is_link_linkinfo_link.tmp";
-var_dump( link($filename, $linkname) );
-$data_from_link = file_get_contents($linkname);  // data read from $filename
-var_dump( $data_from_link );
-
-echo "\n-- Check size of hard link and file --\n";
-if( filesize($filename) == filesize($linkname) ) 
-  echo "\nSize of file and hard link are same\n";
-else
-  echo "\nWarning: Size of file and hard link differ\n";
-
-echo "\n-- Updating file with data through hard link --\n";
-// append link with data
-$fp = fopen($linkname, "a");  // open in append mode
-fwrite($fp, "Hello World");
-fclose($fp);
-
-// now check temp file for data; it should append "Hello World"
-$data_from_file = file_get_contents($filename);
-var_dump( $data_from_file );
-
-echo "\n-- Check size of hard link and file --\n";
-if( filesize($filename) == filesize($linkname) ) 
-  echo "\nSize of file and hard link are same\n";
-else
-  echo "\nWarning: Size of file and hard link differ\n";
-
-echo "\n-- Updating file with data and check data through hard link --\n";
-// write to temp file
-$file = fopen($filename, "w");
-fwrite($file, "Hello World");
-fclose($file);
-
-// now check link for data; it should echo "Hello World"
-$data_from_link = file_get_contents($linkname);
-var_dump( $data_from_link );
-
-echo "\n-- Check size of hard link and file --\n";
-var_dump( filesize($filename) );
-var_dump( filesize($linkname) );
-if( filesize($filename) == filesize($linkname) ) 
-  echo "\nSize of file and hard link are same\n";
-else
-  echo "\nWarning: Size of file and hard link differ\n";
-
-// delete the link
-unlink($linkname);
-// delete the temporary file
-unlink($filename);
-
-/* Variation 4 : Creating link, deleting it and checking linkinfo(), is_link() on it */
-echo "\n*** Testing linkinfo() and is_link() on non-existent link ***\n";
-// link and file names used here
-$non_existent_link = "$file_path/non_existent_link.tmp";
-$filename = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link.tmp";
-var_dump( symlink($filename, $non_existent_link) );  // create link
-var_dump( unlink($non_existent_link) );  // delete the link
-// clear the cache
-clearstatcache();
-// operating on deleted link; expected: false
-var_dump( linkinfo($non_existent_link) );
-var_dump( is_link($non_existent_link) );
-
-/* Variation 5 : Change permission of directory and try creating links inside that directory */
-echo "\n*** Creating links in a directory without permission to allow the operation ***\n";
-// temp file used
-$filename = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link.tmp";
-// remove all permissions from dir
-var_dump( chmod($dirname, 0000) );
-
-echo "\n-- Working with soft links --\n";
-// expected: false
-var_dump( symlink($filename, "$dirname/non_existent_link.tmp") );
-var_dump( linkinfo("$dirname/non_existent_link.tmp") );
-var_dump( is_link("$dirname/non_existent_link.tmp") );
-// clear the cache
-clearstatcache();
-
-echo "\n-- Working with hard links --\n";
-// expected: false
-var_dump( link($filename, "$dirname/non_existent_link.tmp") );
-var_dump( linkinfo("$dirname/non_existent_link.tmp") );
-var_dump( is_link("$dirname/non_existent_link.tmp") );
-// clear the cache
-clearstatcache();
-
-chmod($dirname, 0777);  // to enable dir deletion
-
-/* Variation 6 : Create soft/hard link to itself */
-// temp file used
-$filename = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link.tmp";
-// link name used
-$linkname = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link_link.tmp";
-// temp dirname used
-$dirname = "$file_path/symlink_link_linkinfo_is_link/home/test";
-
-echo "\n*** Create soft link to file and then to itself ***\n";
-// create soft link to $filename
-var_dump( symlink($filename, $linkname) );
-// create another link to $linkname
-var_dump( symlink($linkname, $linkname) );
-// delete link
-unlink($linkname);
-
-echo "\n*** Create soft link to directory and then to itself ***\n";
-// create soft link to $dirname
-var_dump( symlink($dirname, $linkname) );
-// create another link to $dirname
-var_dump( symlink($linkname, $linkname) );
-// delete link
-unlink($linkname);
-
-echo "\n*** Create hard link to file and then to itself ***\n";
-// create hard link to $filename
-var_dump( link($filename, $linkname) );
-// create another link to $linkname
-var_dump( link($linkname, $linkname) );
-// delete link
-unlink($linkname);
-
-/* Variation 7 : Create soft/hard link to different directory */
-/* creating link to a file in different dir with the same name as the file */
-echo "\n*** Create hard link in different directory with same filename ***\n";
-// temp file used
-$filename = "$file_path/symlink_link_linkinfo_is_link.tmp";
-// temp link name used
-mkdir("$file_path/symlink_link_linkinfo_is_link1");
-$linkname = "$file_path/symlink_link_linkinfo_is_link1/symlink_link_linkinfo_is_link.tmp";
-// create temp file
-$fp = fopen($filename, "w");
-fclose($fp);
-
-var_dump( link($filename, "$file_path/symlink_link_linkinfo_is_link1/") ); // this fails indicating file exists
-// ok, creates "$file_path/symlink_link_linkinfo_is_link1/symlink_link_linkinfo_is_link.tmp" link
-var_dump( link($filename, $linkname) );  // this works fine
-// delete link
-unlink($linkname);
-// delete temp file
-unlink($filename);
-// delete temp dir
-rmdir("$file_path/symlink_link_linkinfo_is_link1");
-
-echo "\n*** Create soft link in different directory with same filename ***\n";
-// temp file used
-$filename = "$file_path/symlink_link_linkinfo_is_link.tmp";
-// temp link name used
-mkdir("$file_path/symlink_link_linkinfo_is_link1");
-$linkname = "$file_path/symlink_link_linkinfo_is_link1/symlink_link_linkinfo_is_link.tmp";
-// create temp file
-$fp = fopen($filename, "w");
-fclose($fp);
-
-var_dump( symlink($filename, "$file_path/symlink_link_linkinfo_is_link1/") ); // this fails indicating file exists
-// ok, creates "$file_path/symlink_link_linkinfo_is_link1/symlink_link_linkinfo_is_link.tmp" link
-var_dump( symlink($filename, $linkname) );  // this works fine
-// delete link
-unlink($linkname);
-// delete temp file
-unlink($filename);
-// delete temp dir
-rmdir("$file_path/symlink_link_linkinfo_is_link1");
-
-/* Variation 8 : Check lstat of soft/hard link created 
-                 Check linkinfo() value with lstat['dev']
-*/
-// temp file used
-$filename = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link.tmp";
-// soft link name used
-$soft_link = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link_softlink.tmp";
-// hard link name used
-$hard_link = "$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link_hardlink.tmp";
-// temp dirname used
-$dirname = "$file_path/symlink_link_linkinfo_is_link/";
-
-echo "\n*** Checking lstat() on soft link ***\n";
-// create soft link
-var_dump( symlink($filename, $soft_link) );
-// check lstat of link
-var_dump( lstat($soft_link) );
-
-// confirming that linkinfo() = lstat['dev'] , this should always match
-$linkinfo = linkinfo($soft_link);
-$s1 = lstat($soft_link);
-if( $s1[0] == $linkinfo )
-  echo "\nlinkinfo() value matches lstat['dev']\n";
-else
-  echo "\nWarning: linkinfo() value doesnt match lstat['dev']\n";
-// delete link
-unlink($soft_link);
-
-echo "\n*** Checking lstat() on hard link ***\n";
-// create hard link
-var_dump( link($filename, $hard_link) );
-// check lstat of link
-var_dump( lstat($hard_link) );
-
-// confirming that linkinfo() = lstat['dev'] , this should always match
-$linkinfo = linkinfo($hard_link);
-$s1 = lstat($hard_link);
-if( $s1[0] == $linkinfo )
-  echo "\nlinkinfo() value matches lstat['dev']\n";
-else
-  echo "\nWarning: linkinfo() value doesnt match lstat['dev']\n";
-
-// delete link
-unlink($hard_link);
-
-echo "\n*** Checking lstat() on a soft link to directory ***\n";
-// create soft link
-var_dump( symlink($dirname, $soft_link) );
-// check lstat of link
-var_dump( lstat($soft_link) );
-
-// confirming that linkinfo() = lstat['dev'], this should always match
-$linkinfo = linkinfo($soft_link);
-$s1 = lstat($soft_link);
-if( $s1[0] == $linkinfo )
-  echo "\nlinkinfo() value matches lstat['dev']\n";
-else
-  echo "\nWarning: linkinfo() value doesnt match lstat['dev']\n";
-
-// delete link
-unlink($soft_link);
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-$file_path = dirname(__FILE__);
-$dirname = "$file_path/symlink_link_linkinfo_is_link";
-unlink("$file_path/symlink_link_linkinfo_is_link/symlink_link_linkinfo_is_link.tmp");
-rmdir("$dirname/test/home");
-rmdir("$dirname/test");
-rmdir($dirname);
-?>
---EXPECTF--
-*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members in an object ***
-
--- Working with soft links --
-bool(true)
-int(%i)
-bool(true)
-
--- Working with hard links --
-bool(true)
-int(%i)
-bool(false)
-
-*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members of an array ***
-
--- Working with soft links --
-bool(true)
-int(%i)
-bool(true)
-
--- Working with hard links --
-bool(true)
-int(%i)
-bool(false)
-
-*** Creating a hard link to a non-existent file ***
-
-Warning: link(): No such file or directory in %s on line %i
-bool(false)
-
-Warning: linkinfo(): No such file or directory in %s on line %i
-int(-1)
-bool(false)
-
-*** Accessing and updating data of file through soft link ***
-bool(true)
-
--- Access data of the file through the soft link --
-string(80) "texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext"
-
--- Check size of soft link and file --
-int(80)
-int(80)
-
-Soft link size remains same 
-
--- Updating file with data through soft link --
-string(91) "texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttextHello World"
-
--- Check size of soft link and file --
-int(91)
-int(91)
-
-Soft link size remains same 
-
--- Updating file with data and check data through soft link --
-string(11) "Hello World"
-
--- Check size of soft link and file --
-int(11)
-int(11)
-
-Soft link size remains same 
-
-*** Accessing and updating data of file through hard link ***
-
--- Access data of the file through the hard link --
-bool(true)
-string(80) "texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext"
-
--- Check size of hard link and file --
-
-Size of file and hard link are same
-
--- Updating file with data through hard link --
-string(91) "texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttextHello World"
-
--- Check size of hard link and file --
-
-Size of file and hard link are same
-
--- Updating file with data and check data through hard link --
-string(11) "Hello World"
-
--- Check size of hard link and file --
-int(11)
-int(11)
-
-Size of file and hard link are same
-
-*** Testing linkinfo() and is_link() on non-existent link ***
-bool(true)
-bool(true)
-
-Warning: linkinfo(): No such file or directory in %s on line %i
-int(-1)
-bool(false)
-
-*** Creating links in a directory without permission to allow the operation ***
-bool(true)
-
--- Working with soft links --
-
-Warning: symlink(): Permission denied in %s on line %i
-bool(false)
-
-Warning: linkinfo(): Permission denied in %s on line %i
-int(-1)
-bool(false)
-
--- Working with hard links --
-
-Warning: link(): Permission denied in %s on line %i
-bool(false)
-
-Warning: linkinfo(): Permission denied in %s on line %i
-int(-1)
-bool(false)
-
-*** Create soft link to file and then to itself ***
-bool(true)
-
-Warning: symlink(): File exists in %s on line %i
-bool(false)
-
-*** Create soft link to directory and then to itself ***
-bool(true)
-
-Warning: symlink(): File exists in %s on line %i
-bool(false)
-
-*** Create hard link to file and then to itself ***
-bool(true)
-
-Warning: link(): File exists in %s on line %i
-bool(false)
-
-*** Create hard link in different directory with same filename ***
-
-Warning: link(): File exists in %s on line %i
-bool(false)
-bool(true)
-
-*** Create soft link in different directory with same filename ***
-
-Warning: symlink(): File exists in %s on line %i
-bool(false)
-bool(true)
-
-*** Checking lstat() on soft link ***
-bool(true)
-array(26) {
-  [0]=>
-  int(%i)
-  [1]=>
-  int(%i)
-  [2]=>
-  int(%i)
-  [3]=>
-  int(1)
-  [4]=>
-  int(%i)
-  [5]=>
-  int(%i)
-  [6]=>
-  int(%i)
-  [7]=>
-  int(%i)
-  [8]=>
-  int(%i)
-  [9]=>
-  int(%i)
-  [10]=>
-  int(%i)
-  [11]=>
-  int(%i)
-  [12]=>
-  int(%i)
-  ["dev"]=>
-  int(%i)
-  ["ino"]=>
-  int(%i)
-  ["mode"]=>
-  int(%i)
-  ["nlink"]=>
-  int(1)
-  ["uid"]=>
-  int(%i)
-  ["gid"]=>
-  int(%i)
-  ["rdev"]=>
-  int(%i)
-  ["size"]=>
-  int(%i)
-  ["atime"]=>
-  int(%i)
-  ["mtime"]=>
-  int(%i)
-  ["ctime"]=>
-  int(%i)
-  ["blksize"]=>
-  int(%i)
-  ["blocks"]=>
-  int(%i)
-}
-
-linkinfo() value matches lstat['dev']
-
-*** Checking lstat() on hard link ***
-bool(true)
-array(26) {
-  [0]=>
-  int(%i)
-  [1]=>
-  int(%i)
-  [2]=>
-  int(%i)
-  [3]=>
-  int(2)
-  [4]=>
-  int(%i)
-  [5]=>
-  int(%i)
-  [6]=>
-  int(%i)
-  [7]=>
-  int(%i)
-  [8]=>
-  int(%i)
-  [9]=>
-  int(%i)
-  [10]=>
-  int(%i)
-  [11]=>
-  int(%i)
-  [12]=>
-  int(%i)
-  ["dev"]=>
-  int(%i)
-  ["ino"]=>
-  int(%i)
-  ["mode"]=>
-  int(%i)
-  ["nlink"]=>
-  int(2)
-  ["uid"]=>
-  int(%i)
-  ["gid"]=>
-  int(%i)
-  ["rdev"]=>
-  int(%i)
-  ["size"]=>
-  int(%i)
-  ["atime"]=>
-  int(%i)
-  ["mtime"]=>
-  int(%i)
-  ["ctime"]=>
-  int(%i)
-  ["blksize"]=>
-  int(%i)
-  ["blocks"]=>
-  int(%i)
-}
-
-linkinfo() value matches lstat['dev']
-
-*** Checking lstat() on a soft link to directory ***
-bool(true)
-array(26) {
-  [0]=>
-  int(%i)
-  [1]=>
-  int(%i)
-  [2]=>
-  int(%i)
-  [3]=>
-  int(1)
-  [4]=>
-  int(%i)
-  [5]=>
-  int(%i)
-  [6]=>
-  int(%i)
-  [7]=>
-  int(%i)
-  [8]=>
-  int(%i)
-  [9]=>
-  int(%i)
-  [10]=>
-  int(%i)
-  [11]=>
-  int(%i)
-  [12]=>
-  int(%i)
-  ["dev"]=>
-  int(%i)
-  ["ino"]=>
-  int(%i)
-  ["mode"]=>
-  int(%i)
-  ["nlink"]=>
-  int(1)
-  ["uid"]=>
-  int(%i)
-  ["gid"]=>
-  int(%i)
-  ["rdev"]=>
-  int(%i)
-  ["size"]=>
-  int(%i)
-  ["atime"]=>
-  int(%i)
-  ["mtime"]=>
-  int(%i)
-  ["ctime"]=>
-  int(%i)
-  ["blksize"]=>
-  int(%i)
-  ["blocks"]=>
-  int(%i)
-}
-
-linkinfo() value matches lstat['dev']
-Done