Annotation of embedaddon/php/ext/standard/tests/file/chmod_basic-win32.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
1.1.1.2 ! misho 2: chmod() basic functionality
1.1 misho 3: --SKIPIF--
4: <?php
5: if (substr(PHP_OS, 0, 3) != 'WIN') {
6: die('skip Windows only chmod test');
7: }
8: ?>
9: --FILE--
10: <?php
11:
12: define("PERMISSIONS_MASK", 0777);
13:
14: $filename = __FILE__ . ".tmp";
15:
16: $fd = fopen($filename, "w+");
17: fclose($fd);
18:
19: for ($perms_to_set = 0777; $perms_to_set >= 0; $perms_to_set--) {
20: chmod($filename, $perms_to_set);
21: $set_perms = (fileperms($filename) & PERMISSIONS_MASK);
22: clearstatcache();
23: printf("Setting mode %o gives mode %o\n", $perms_to_set, $set_perms);
24: }
25: var_dump(chmod($filename, 0777));
26:
27: unlink($filename);
28: echo "done";
29:
30: ?>
31: --EXPECT--
32: Setting mode 777 gives mode 666
33: Setting mode 776 gives mode 666
34: Setting mode 775 gives mode 666
35: Setting mode 774 gives mode 666
36: Setting mode 773 gives mode 666
37: Setting mode 772 gives mode 666
38: Setting mode 771 gives mode 666
39: Setting mode 770 gives mode 666
40: Setting mode 767 gives mode 666
41: Setting mode 766 gives mode 666
42: Setting mode 765 gives mode 666
43: Setting mode 764 gives mode 666
44: Setting mode 763 gives mode 666
45: Setting mode 762 gives mode 666
46: Setting mode 761 gives mode 666
47: Setting mode 760 gives mode 666
48: Setting mode 757 gives mode 666
49: Setting mode 756 gives mode 666
50: Setting mode 755 gives mode 666
51: Setting mode 754 gives mode 666
52: Setting mode 753 gives mode 666
53: Setting mode 752 gives mode 666
54: Setting mode 751 gives mode 666
55: Setting mode 750 gives mode 666
56: Setting mode 747 gives mode 666
57: Setting mode 746 gives mode 666
58: Setting mode 745 gives mode 666
59: Setting mode 744 gives mode 666
60: Setting mode 743 gives mode 666
61: Setting mode 742 gives mode 666
62: Setting mode 741 gives mode 666
63: Setting mode 740 gives mode 666
64: Setting mode 737 gives mode 666
65: Setting mode 736 gives mode 666
66: Setting mode 735 gives mode 666
67: Setting mode 734 gives mode 666
68: Setting mode 733 gives mode 666
69: Setting mode 732 gives mode 666
70: Setting mode 731 gives mode 666
71: Setting mode 730 gives mode 666
72: Setting mode 727 gives mode 666
73: Setting mode 726 gives mode 666
74: Setting mode 725 gives mode 666
75: Setting mode 724 gives mode 666
76: Setting mode 723 gives mode 666
77: Setting mode 722 gives mode 666
78: Setting mode 721 gives mode 666
79: Setting mode 720 gives mode 666
80: Setting mode 717 gives mode 666
81: Setting mode 716 gives mode 666
82: Setting mode 715 gives mode 666
83: Setting mode 714 gives mode 666
84: Setting mode 713 gives mode 666
85: Setting mode 712 gives mode 666
86: Setting mode 711 gives mode 666
87: Setting mode 710 gives mode 666
88: Setting mode 707 gives mode 666
89: Setting mode 706 gives mode 666
90: Setting mode 705 gives mode 666
91: Setting mode 704 gives mode 666
92: Setting mode 703 gives mode 666
93: Setting mode 702 gives mode 666
94: Setting mode 701 gives mode 666
95: Setting mode 700 gives mode 666
96: Setting mode 677 gives mode 666
97: Setting mode 676 gives mode 666
98: Setting mode 675 gives mode 666
99: Setting mode 674 gives mode 666
100: Setting mode 673 gives mode 666
101: Setting mode 672 gives mode 666
102: Setting mode 671 gives mode 666
103: Setting mode 670 gives mode 666
104: Setting mode 667 gives mode 666
105: Setting mode 666 gives mode 666
106: Setting mode 665 gives mode 666
107: Setting mode 664 gives mode 666
108: Setting mode 663 gives mode 666
109: Setting mode 662 gives mode 666
110: Setting mode 661 gives mode 666
111: Setting mode 660 gives mode 666
112: Setting mode 657 gives mode 666
113: Setting mode 656 gives mode 666
114: Setting mode 655 gives mode 666
115: Setting mode 654 gives mode 666
116: Setting mode 653 gives mode 666
117: Setting mode 652 gives mode 666
118: Setting mode 651 gives mode 666
119: Setting mode 650 gives mode 666
120: Setting mode 647 gives mode 666
121: Setting mode 646 gives mode 666
122: Setting mode 645 gives mode 666
123: Setting mode 644 gives mode 666
124: Setting mode 643 gives mode 666
125: Setting mode 642 gives mode 666
126: Setting mode 641 gives mode 666
127: Setting mode 640 gives mode 666
128: Setting mode 637 gives mode 666
129: Setting mode 636 gives mode 666
130: Setting mode 635 gives mode 666
131: Setting mode 634 gives mode 666
132: Setting mode 633 gives mode 666
133: Setting mode 632 gives mode 666
134: Setting mode 631 gives mode 666
135: Setting mode 630 gives mode 666
136: Setting mode 627 gives mode 666
137: Setting mode 626 gives mode 666
138: Setting mode 625 gives mode 666
139: Setting mode 624 gives mode 666
140: Setting mode 623 gives mode 666
141: Setting mode 622 gives mode 666
142: Setting mode 621 gives mode 666
143: Setting mode 620 gives mode 666
144: Setting mode 617 gives mode 666
145: Setting mode 616 gives mode 666
146: Setting mode 615 gives mode 666
147: Setting mode 614 gives mode 666
148: Setting mode 613 gives mode 666
149: Setting mode 612 gives mode 666
150: Setting mode 611 gives mode 666
151: Setting mode 610 gives mode 666
152: Setting mode 607 gives mode 666
153: Setting mode 606 gives mode 666
154: Setting mode 605 gives mode 666
155: Setting mode 604 gives mode 666
156: Setting mode 603 gives mode 666
157: Setting mode 602 gives mode 666
158: Setting mode 601 gives mode 666
159: Setting mode 600 gives mode 666
160: Setting mode 577 gives mode 444
161: Setting mode 576 gives mode 444
162: Setting mode 575 gives mode 444
163: Setting mode 574 gives mode 444
164: Setting mode 573 gives mode 444
165: Setting mode 572 gives mode 444
166: Setting mode 571 gives mode 444
167: Setting mode 570 gives mode 444
168: Setting mode 567 gives mode 444
169: Setting mode 566 gives mode 444
170: Setting mode 565 gives mode 444
171: Setting mode 564 gives mode 444
172: Setting mode 563 gives mode 444
173: Setting mode 562 gives mode 444
174: Setting mode 561 gives mode 444
175: Setting mode 560 gives mode 444
176: Setting mode 557 gives mode 444
177: Setting mode 556 gives mode 444
178: Setting mode 555 gives mode 444
179: Setting mode 554 gives mode 444
180: Setting mode 553 gives mode 444
181: Setting mode 552 gives mode 444
182: Setting mode 551 gives mode 444
183: Setting mode 550 gives mode 444
184: Setting mode 547 gives mode 444
185: Setting mode 546 gives mode 444
186: Setting mode 545 gives mode 444
187: Setting mode 544 gives mode 444
188: Setting mode 543 gives mode 444
189: Setting mode 542 gives mode 444
190: Setting mode 541 gives mode 444
191: Setting mode 540 gives mode 444
192: Setting mode 537 gives mode 444
193: Setting mode 536 gives mode 444
194: Setting mode 535 gives mode 444
195: Setting mode 534 gives mode 444
196: Setting mode 533 gives mode 444
197: Setting mode 532 gives mode 444
198: Setting mode 531 gives mode 444
199: Setting mode 530 gives mode 444
200: Setting mode 527 gives mode 444
201: Setting mode 526 gives mode 444
202: Setting mode 525 gives mode 444
203: Setting mode 524 gives mode 444
204: Setting mode 523 gives mode 444
205: Setting mode 522 gives mode 444
206: Setting mode 521 gives mode 444
207: Setting mode 520 gives mode 444
208: Setting mode 517 gives mode 444
209: Setting mode 516 gives mode 444
210: Setting mode 515 gives mode 444
211: Setting mode 514 gives mode 444
212: Setting mode 513 gives mode 444
213: Setting mode 512 gives mode 444
214: Setting mode 511 gives mode 444
215: Setting mode 510 gives mode 444
216: Setting mode 507 gives mode 444
217: Setting mode 506 gives mode 444
218: Setting mode 505 gives mode 444
219: Setting mode 504 gives mode 444
220: Setting mode 503 gives mode 444
221: Setting mode 502 gives mode 444
222: Setting mode 501 gives mode 444
223: Setting mode 500 gives mode 444
224: Setting mode 477 gives mode 444
225: Setting mode 476 gives mode 444
226: Setting mode 475 gives mode 444
227: Setting mode 474 gives mode 444
228: Setting mode 473 gives mode 444
229: Setting mode 472 gives mode 444
230: Setting mode 471 gives mode 444
231: Setting mode 470 gives mode 444
232: Setting mode 467 gives mode 444
233: Setting mode 466 gives mode 444
234: Setting mode 465 gives mode 444
235: Setting mode 464 gives mode 444
236: Setting mode 463 gives mode 444
237: Setting mode 462 gives mode 444
238: Setting mode 461 gives mode 444
239: Setting mode 460 gives mode 444
240: Setting mode 457 gives mode 444
241: Setting mode 456 gives mode 444
242: Setting mode 455 gives mode 444
243: Setting mode 454 gives mode 444
244: Setting mode 453 gives mode 444
245: Setting mode 452 gives mode 444
246: Setting mode 451 gives mode 444
247: Setting mode 450 gives mode 444
248: Setting mode 447 gives mode 444
249: Setting mode 446 gives mode 444
250: Setting mode 445 gives mode 444
251: Setting mode 444 gives mode 444
252: Setting mode 443 gives mode 444
253: Setting mode 442 gives mode 444
254: Setting mode 441 gives mode 444
255: Setting mode 440 gives mode 444
256: Setting mode 437 gives mode 444
257: Setting mode 436 gives mode 444
258: Setting mode 435 gives mode 444
259: Setting mode 434 gives mode 444
260: Setting mode 433 gives mode 444
261: Setting mode 432 gives mode 444
262: Setting mode 431 gives mode 444
263: Setting mode 430 gives mode 444
264: Setting mode 427 gives mode 444
265: Setting mode 426 gives mode 444
266: Setting mode 425 gives mode 444
267: Setting mode 424 gives mode 444
268: Setting mode 423 gives mode 444
269: Setting mode 422 gives mode 444
270: Setting mode 421 gives mode 444
271: Setting mode 420 gives mode 444
272: Setting mode 417 gives mode 444
273: Setting mode 416 gives mode 444
274: Setting mode 415 gives mode 444
275: Setting mode 414 gives mode 444
276: Setting mode 413 gives mode 444
277: Setting mode 412 gives mode 444
278: Setting mode 411 gives mode 444
279: Setting mode 410 gives mode 444
280: Setting mode 407 gives mode 444
281: Setting mode 406 gives mode 444
282: Setting mode 405 gives mode 444
283: Setting mode 404 gives mode 444
284: Setting mode 403 gives mode 444
285: Setting mode 402 gives mode 444
286: Setting mode 401 gives mode 444
287: Setting mode 400 gives mode 444
288: Setting mode 377 gives mode 666
289: Setting mode 376 gives mode 666
290: Setting mode 375 gives mode 666
291: Setting mode 374 gives mode 666
292: Setting mode 373 gives mode 666
293: Setting mode 372 gives mode 666
294: Setting mode 371 gives mode 666
295: Setting mode 370 gives mode 666
296: Setting mode 367 gives mode 666
297: Setting mode 366 gives mode 666
298: Setting mode 365 gives mode 666
299: Setting mode 364 gives mode 666
300: Setting mode 363 gives mode 666
301: Setting mode 362 gives mode 666
302: Setting mode 361 gives mode 666
303: Setting mode 360 gives mode 666
304: Setting mode 357 gives mode 666
305: Setting mode 356 gives mode 666
306: Setting mode 355 gives mode 666
307: Setting mode 354 gives mode 666
308: Setting mode 353 gives mode 666
309: Setting mode 352 gives mode 666
310: Setting mode 351 gives mode 666
311: Setting mode 350 gives mode 666
312: Setting mode 347 gives mode 666
313: Setting mode 346 gives mode 666
314: Setting mode 345 gives mode 666
315: Setting mode 344 gives mode 666
316: Setting mode 343 gives mode 666
317: Setting mode 342 gives mode 666
318: Setting mode 341 gives mode 666
319: Setting mode 340 gives mode 666
320: Setting mode 337 gives mode 666
321: Setting mode 336 gives mode 666
322: Setting mode 335 gives mode 666
323: Setting mode 334 gives mode 666
324: Setting mode 333 gives mode 666
325: Setting mode 332 gives mode 666
326: Setting mode 331 gives mode 666
327: Setting mode 330 gives mode 666
328: Setting mode 327 gives mode 666
329: Setting mode 326 gives mode 666
330: Setting mode 325 gives mode 666
331: Setting mode 324 gives mode 666
332: Setting mode 323 gives mode 666
333: Setting mode 322 gives mode 666
334: Setting mode 321 gives mode 666
335: Setting mode 320 gives mode 666
336: Setting mode 317 gives mode 666
337: Setting mode 316 gives mode 666
338: Setting mode 315 gives mode 666
339: Setting mode 314 gives mode 666
340: Setting mode 313 gives mode 666
341: Setting mode 312 gives mode 666
342: Setting mode 311 gives mode 666
343: Setting mode 310 gives mode 666
344: Setting mode 307 gives mode 666
345: Setting mode 306 gives mode 666
346: Setting mode 305 gives mode 666
347: Setting mode 304 gives mode 666
348: Setting mode 303 gives mode 666
349: Setting mode 302 gives mode 666
350: Setting mode 301 gives mode 666
351: Setting mode 300 gives mode 666
352: Setting mode 277 gives mode 666
353: Setting mode 276 gives mode 666
354: Setting mode 275 gives mode 666
355: Setting mode 274 gives mode 666
356: Setting mode 273 gives mode 666
357: Setting mode 272 gives mode 666
358: Setting mode 271 gives mode 666
359: Setting mode 270 gives mode 666
360: Setting mode 267 gives mode 666
361: Setting mode 266 gives mode 666
362: Setting mode 265 gives mode 666
363: Setting mode 264 gives mode 666
364: Setting mode 263 gives mode 666
365: Setting mode 262 gives mode 666
366: Setting mode 261 gives mode 666
367: Setting mode 260 gives mode 666
368: Setting mode 257 gives mode 666
369: Setting mode 256 gives mode 666
370: Setting mode 255 gives mode 666
371: Setting mode 254 gives mode 666
372: Setting mode 253 gives mode 666
373: Setting mode 252 gives mode 666
374: Setting mode 251 gives mode 666
375: Setting mode 250 gives mode 666
376: Setting mode 247 gives mode 666
377: Setting mode 246 gives mode 666
378: Setting mode 245 gives mode 666
379: Setting mode 244 gives mode 666
380: Setting mode 243 gives mode 666
381: Setting mode 242 gives mode 666
382: Setting mode 241 gives mode 666
383: Setting mode 240 gives mode 666
384: Setting mode 237 gives mode 666
385: Setting mode 236 gives mode 666
386: Setting mode 235 gives mode 666
387: Setting mode 234 gives mode 666
388: Setting mode 233 gives mode 666
389: Setting mode 232 gives mode 666
390: Setting mode 231 gives mode 666
391: Setting mode 230 gives mode 666
392: Setting mode 227 gives mode 666
393: Setting mode 226 gives mode 666
394: Setting mode 225 gives mode 666
395: Setting mode 224 gives mode 666
396: Setting mode 223 gives mode 666
397: Setting mode 222 gives mode 666
398: Setting mode 221 gives mode 666
399: Setting mode 220 gives mode 666
400: Setting mode 217 gives mode 666
401: Setting mode 216 gives mode 666
402: Setting mode 215 gives mode 666
403: Setting mode 214 gives mode 666
404: Setting mode 213 gives mode 666
405: Setting mode 212 gives mode 666
406: Setting mode 211 gives mode 666
407: Setting mode 210 gives mode 666
408: Setting mode 207 gives mode 666
409: Setting mode 206 gives mode 666
410: Setting mode 205 gives mode 666
411: Setting mode 204 gives mode 666
412: Setting mode 203 gives mode 666
413: Setting mode 202 gives mode 666
414: Setting mode 201 gives mode 666
415: Setting mode 200 gives mode 666
416: Setting mode 177 gives mode 444
417: Setting mode 176 gives mode 444
418: Setting mode 175 gives mode 444
419: Setting mode 174 gives mode 444
420: Setting mode 173 gives mode 444
421: Setting mode 172 gives mode 444
422: Setting mode 171 gives mode 444
423: Setting mode 170 gives mode 444
424: Setting mode 167 gives mode 444
425: Setting mode 166 gives mode 444
426: Setting mode 165 gives mode 444
427: Setting mode 164 gives mode 444
428: Setting mode 163 gives mode 444
429: Setting mode 162 gives mode 444
430: Setting mode 161 gives mode 444
431: Setting mode 160 gives mode 444
432: Setting mode 157 gives mode 444
433: Setting mode 156 gives mode 444
434: Setting mode 155 gives mode 444
435: Setting mode 154 gives mode 444
436: Setting mode 153 gives mode 444
437: Setting mode 152 gives mode 444
438: Setting mode 151 gives mode 444
439: Setting mode 150 gives mode 444
440: Setting mode 147 gives mode 444
441: Setting mode 146 gives mode 444
442: Setting mode 145 gives mode 444
443: Setting mode 144 gives mode 444
444: Setting mode 143 gives mode 444
445: Setting mode 142 gives mode 444
446: Setting mode 141 gives mode 444
447: Setting mode 140 gives mode 444
448: Setting mode 137 gives mode 444
449: Setting mode 136 gives mode 444
450: Setting mode 135 gives mode 444
451: Setting mode 134 gives mode 444
452: Setting mode 133 gives mode 444
453: Setting mode 132 gives mode 444
454: Setting mode 131 gives mode 444
455: Setting mode 130 gives mode 444
456: Setting mode 127 gives mode 444
457: Setting mode 126 gives mode 444
458: Setting mode 125 gives mode 444
459: Setting mode 124 gives mode 444
460: Setting mode 123 gives mode 444
461: Setting mode 122 gives mode 444
462: Setting mode 121 gives mode 444
463: Setting mode 120 gives mode 444
464: Setting mode 117 gives mode 444
465: Setting mode 116 gives mode 444
466: Setting mode 115 gives mode 444
467: Setting mode 114 gives mode 444
468: Setting mode 113 gives mode 444
469: Setting mode 112 gives mode 444
470: Setting mode 111 gives mode 444
471: Setting mode 110 gives mode 444
472: Setting mode 107 gives mode 444
473: Setting mode 106 gives mode 444
474: Setting mode 105 gives mode 444
475: Setting mode 104 gives mode 444
476: Setting mode 103 gives mode 444
477: Setting mode 102 gives mode 444
478: Setting mode 101 gives mode 444
479: Setting mode 100 gives mode 444
480: Setting mode 77 gives mode 444
481: Setting mode 76 gives mode 444
482: Setting mode 75 gives mode 444
483: Setting mode 74 gives mode 444
484: Setting mode 73 gives mode 444
485: Setting mode 72 gives mode 444
486: Setting mode 71 gives mode 444
487: Setting mode 70 gives mode 444
488: Setting mode 67 gives mode 444
489: Setting mode 66 gives mode 444
490: Setting mode 65 gives mode 444
491: Setting mode 64 gives mode 444
492: Setting mode 63 gives mode 444
493: Setting mode 62 gives mode 444
494: Setting mode 61 gives mode 444
495: Setting mode 60 gives mode 444
496: Setting mode 57 gives mode 444
497: Setting mode 56 gives mode 444
498: Setting mode 55 gives mode 444
499: Setting mode 54 gives mode 444
500: Setting mode 53 gives mode 444
501: Setting mode 52 gives mode 444
502: Setting mode 51 gives mode 444
503: Setting mode 50 gives mode 444
504: Setting mode 47 gives mode 444
505: Setting mode 46 gives mode 444
506: Setting mode 45 gives mode 444
507: Setting mode 44 gives mode 444
508: Setting mode 43 gives mode 444
509: Setting mode 42 gives mode 444
510: Setting mode 41 gives mode 444
511: Setting mode 40 gives mode 444
512: Setting mode 37 gives mode 444
513: Setting mode 36 gives mode 444
514: Setting mode 35 gives mode 444
515: Setting mode 34 gives mode 444
516: Setting mode 33 gives mode 444
517: Setting mode 32 gives mode 444
518: Setting mode 31 gives mode 444
519: Setting mode 30 gives mode 444
520: Setting mode 27 gives mode 444
521: Setting mode 26 gives mode 444
522: Setting mode 25 gives mode 444
523: Setting mode 24 gives mode 444
524: Setting mode 23 gives mode 444
525: Setting mode 22 gives mode 444
526: Setting mode 21 gives mode 444
527: Setting mode 20 gives mode 444
528: Setting mode 17 gives mode 444
529: Setting mode 16 gives mode 444
530: Setting mode 15 gives mode 444
531: Setting mode 14 gives mode 444
532: Setting mode 13 gives mode 444
533: Setting mode 12 gives mode 444
534: Setting mode 11 gives mode 444
535: Setting mode 10 gives mode 444
536: Setting mode 7 gives mode 444
537: Setting mode 6 gives mode 444
538: Setting mode 5 gives mode 444
539: Setting mode 4 gives mode 444
540: Setting mode 3 gives mode 444
541: Setting mode 2 gives mode 444
542: Setting mode 1 gives mode 444
543: Setting mode 0 gives mode 444
544: bool(true)
545: done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>