1 *** Testing fgets() : basic functionality ***
3 -- Testing fgets() with file opened using mode r --
4 -- File content type : numeric --
5 -- fgets() with default length, file pointer at 0 --
6 string(50) "22222222222222222222222222222222222222222222222222"
9 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
11 string(22) "2222222222222222222222"
14 -- File content type : text --
15 -- fgets() with default length, file pointer at 0 --
16 string(50) "text text text text text text text text text text "
19 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
21 string(22) "text text text text te"
24 -- File content type : text_with_new_line --
25 -- fgets() with default length, file pointer at 0 --
30 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
36 -- File content type : alphanumeric --
37 -- fgets() with default length, file pointer at 0 --
38 string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
41 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
43 string(22) "ab12 ab12 ab12 ab12 ab"
47 -- Testing fgets() with file opened using mode rb --
48 -- File content type : numeric --
49 -- fgets() with default length, file pointer at 0 --
50 string(50) "22222222222222222222222222222222222222222222222222"
53 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
55 string(22) "2222222222222222222222"
58 -- File content type : text --
59 -- fgets() with default length, file pointer at 0 --
60 string(50) "text text text text text text text text text text "
63 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
65 string(22) "text text text text te"
68 -- File content type : text_with_new_line --
69 -- fgets() with default length, file pointer at 0 --
74 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
80 -- File content type : alphanumeric --
81 -- fgets() with default length, file pointer at 0 --
82 string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
85 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
87 string(22) "ab12 ab12 ab12 ab12 ab"
91 -- Testing fgets() with file opened using mode rt --
92 -- File content type : numeric --
93 -- fgets() with default length, file pointer at 0 --
94 string(50) "22222222222222222222222222222222222222222222222222"
97 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
99 string(22) "2222222222222222222222"
102 -- File content type : text --
103 -- fgets() with default length, file pointer at 0 --
104 string(50) "text text text text text text text text text text "
107 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
109 string(22) "text text text text te"
112 -- File content type : text_with_new_line --
113 -- fgets() with default length, file pointer at 0 --
118 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
124 -- File content type : alphanumeric --
125 -- fgets() with default length, file pointer at 0 --
126 string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
129 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
131 string(22) "ab12 ab12 ab12 ab12 ab"
135 -- Testing fgets() with file opened using mode r+ --
136 -- File content type : numeric --
137 -- fgets() with default length, file pointer at 0 --
138 string(50) "22222222222222222222222222222222222222222222222222"
141 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
143 string(22) "2222222222222222222222"
146 -- File content type : text --
147 -- fgets() with default length, file pointer at 0 --
148 string(50) "text text text text text text text text text text "
151 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
153 string(22) "text text text text te"
156 -- File content type : text_with_new_line --
157 -- fgets() with default length, file pointer at 0 --
162 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
168 -- File content type : alphanumeric --
169 -- fgets() with default length, file pointer at 0 --
170 string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
173 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
175 string(22) "ab12 ab12 ab12 ab12 ab"
179 -- Testing fgets() with file opened using mode r+b --
180 -- File content type : numeric --
181 -- fgets() with default length, file pointer at 0 --
182 string(50) "22222222222222222222222222222222222222222222222222"
185 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
187 string(22) "2222222222222222222222"
190 -- File content type : text --
191 -- fgets() with default length, file pointer at 0 --
192 string(50) "text text text text text text text text text text "
195 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
197 string(22) "text text text text te"
200 -- File content type : text_with_new_line --
201 -- fgets() with default length, file pointer at 0 --
206 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
212 -- File content type : alphanumeric --
213 -- fgets() with default length, file pointer at 0 --
214 string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
217 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
219 string(22) "ab12 ab12 ab12 ab12 ab"
223 -- Testing fgets() with file opened using mode r+t --
224 -- File content type : numeric --
225 -- fgets() with default length, file pointer at 0 --
226 string(50) "22222222222222222222222222222222222222222222222222"
229 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
231 string(22) "2222222222222222222222"
234 -- File content type : text --
235 -- fgets() with default length, file pointer at 0 --
236 string(50) "text text text text text text text text text text "
239 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
241 string(22) "text text text text te"
244 -- File content type : text_with_new_line --
245 -- fgets() with default length, file pointer at 0 --
250 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
256 -- File content type : alphanumeric --
257 -- fgets() with default length, file pointer at 0 --
258 string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
261 -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
263 string(22) "ab12 ab12 ab12 ab12 ab"