Lines Matching refs:tf

62 orlv_expect(struct t_file *tf, const char **expectedv, int lines, int eof)  in orlv_expect()  argument
73 gotv = openpam_readlinev(tf->file, &lineno, &gotc); in orlv_expect()
74 if (t_ferror(tf)) in orlv_expect()
75 err(1, "%s(): %s", __func__, tf->name); in orlv_expect()
102 if (eof && !t_feof(tf)) { in orlv_expect()
105 } else if (!eof && t_feof(tf)) { in orlv_expect()
156 struct t_file *tf; variable
159 tf = t_fopen(NULL);
160 ret = orlv_expect(tf, NULL, 0 /*lines*/, 1 /*eof*/);
161 t_fclose(tf);
167 struct t_file *tf; variable
170 tf = t_fopen(NULL);
171 t_fprintf(tf, "\n");
172 t_frewind(tf);
173 ret = orlv_expect(tf, empty, 1 /*lines*/, 0 /*eof*/);
174 t_fclose(tf);
180 struct t_file *tf; variable
183 tf = t_fopen(NULL);
184 t_fprintf(tf, " ");
185 t_frewind(tf);
186 ret = orlv_expect(tf, NULL, 0 /*lines*/, 1 /*eof*/);
187 t_fclose(tf);
193 struct t_file *tf; variable
196 tf = t_fopen(NULL);
197 t_fprintf(tf, " \n");
198 t_frewind(tf);
199 ret = orlv_expect(tf, empty, 1 /*lines*/, 0 /*eof*/);
200 t_fclose(tf);
206 struct t_file *tf; variable
209 tf = t_fopen(NULL);
210 t_fprintf(tf, "# comment\n");
211 t_frewind(tf);
212 ret = orlv_expect(tf, empty, 1 /*lines*/, 0 /*eof*/);
213 t_fclose(tf);
219 struct t_file *tf; variable
222 tf = t_fopen(NULL);
223 t_fprintf(tf, " # comment\n");
224 t_frewind(tf);
225 ret = orlv_expect(tf, empty, 1 /*lines*/, 0 /*eof*/);
226 t_fclose(tf);
232 struct t_file *tf; variable
235 tf = t_fopen(NULL);
236 t_fprintf(tf, "%s \\\n %s\n", hello_world[0], hello_world[1]);
237 t_frewind(tf);
238 ret = orlv_expect(tf, hello_world, 2 /*lines*/, 0 /*eof*/) &&
239 orlv_expect(tf, NULL, 0 /*lines*/, 1 /*eof*/);
240 t_fclose(tf);
251 struct t_file *tf; variable
254 tf = t_fopen(NULL);
255 t_fprintf(tf, "hello\n");
256 t_frewind(tf);
257 ret = orlv_expect(tf, hello, 1 /*lines*/, 0 /*eof*/);
258 t_fclose(tf);
264 struct t_file *tf; variable
267 tf = t_fopen(NULL);
268 t_fprintf(tf, "hello world\n");
269 t_frewind(tf);
270 ret = orlv_expect(tf, hello_world, 1 /*lines*/, 0 /*eof*/);
271 t_fclose(tf);
277 struct t_file *tf; variable
281 tf = t_fopen(NULL);
283 t_fprintf(tf, " %s", *word);
284 t_fprintf(tf, "\n");
285 t_frewind(tf);
286 ret = orlv_expect(tf, numbers, 1 /*lines*/, 0 /*eof*/);
287 t_fclose(tf);
293 struct t_file *tf; variable
296 tf = t_fopen(NULL);
297 t_fprintf(tf, "hello world");
298 t_frewind(tf);
299 ret = orlv_expect(tf, hello_world, 0 /*lines*/, 1 /*eof*/);
300 t_fclose(tf);