Lines Matching refs:test

8 if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
13 @unlink('test.file');
14 @unlink('test.link');
15 if (file_exists('test.file')) {
16 echo "test.file exists\n";
18 echo "test.file does not exist\n";
20 fclose (fopen('test.file', 'w'));
21 chmod ('test.file', 0744);
22 if (file_exists('test.file')) {
23 echo "test.file exists\n";
25 echo "test.file does not exist\n";
28 symlink('test.file','test.link');
29 if (file_exists('test.link')) {
30 echo "test.link exists\n";
32 echo "test.link does not exist\n";
34 if (is_link('test.file')) {
35 echo "test.file is a symlink\n";
37 echo "test.file is not a symlink\n";
39 if (is_link('test.link')) {
40 echo "test.link is a symlink\n";
42 echo "test.link is not a symlink\n";
44 if (file_exists('test.file')) {
45 echo "test.file exists\n";
47 echo "test.file does not exist\n";
49 $s = stat ('test.file');
50 $ls = lstat ('test.file');
53 echo "test.file lstat and stat differ at element $i\n";
56 $s = stat ('test.link');
57 $ls = lstat ('test.link');
60 if ($i != 6 && $i != 10 && $i != 11) echo "test.link lstat and stat differ at element $i\n";
63 echo "test.file is " . filetype('test.file') . "\n";
64 echo "test.link is " . filetype('test.link') . "\n";
65 printf ("test.file permissions are 0%o\n", 0777 & fileperms('test.file'));
66 echo "test.file size is " . filesize('test.file') . "\n";
67 if (is_writeable('test.file')) {
68 echo "test.file is writeable\n";
70 echo "test.file is not writeable\n";
72 if (is_readable('test.file')) {
73 echo "test.file is readable\n";
75 echo "test.file is not readable\n";
77 if (is_executable('test.file')) {
78 echo "test.file is executable\n";
80 echo "test.file is not executable\n";
82 if (is_file('test.file')) {
83 echo "test.file is a regular file\n";
85 echo "test.file is not a regular file\n";
87 if (is_file('test.link')) {
88 echo "test.link is a regular file\n";
90 echo "test.link is not a regular file\n";
92 if (is_dir('test.link')) {
93 echo "test.link is a directory\n";
95 echo "test.link is not a directory\n";
102 if (is_dir('test.file')) {
103 echo "test.file is a directory\n";
105 echo "test.file is not a directory\n";
107 unlink('test.file');
108 unlink('test.link');
109 if (file_exists('test.file')) {
110 echo "test.file exists (cached)\n";
112 echo "test.file does not exist\n";
115 if (file_exists('test.file')) {
116 echo "test.file exists\n";
118 echo "test.file does not exist\n";
122 test.file does not exist
123 test.file exists
124 test.link exists
125 test.file is not a symlink
126 test.link is a symlink
127 test.file exists
128 test.link lstat and stat differ at element 1
129 test.link lstat and stat differ at element 2
130 test.link lstat and stat differ at element 7
131 test.link lstat and stat differ at element 8
132 test.link lstat and stat differ at element 9
133 test.file is file
134 test.link is link
135 test.file permissions are 0744
136 test.file size is 0
137 test.file is writeable
138 test.file is readable
139 test.file is executable
140 test.file is a regular file
141 test.link is a regular file
142 test.link is not a directory
144 test.file is not a directory
145 test.file does not exist
146 test.file does not exist