Lines Matching refs:cl

54 	struct cmdline *cl;  in test_cmdline_parse_fns()  local
59 cl = cmdline_new(&ctx, "prompt", -1, -1); in test_cmdline_parse_fns()
60 if (cl == NULL) { in test_cmdline_parse_fns()
67 if (cmdline_parse(cl, NULL) >= 0) in test_cmdline_parse_fns()
72 if (cmdline_complete(cl, NULL, &i, dst, sizeof(dst)) >= 0) in test_cmdline_parse_fns()
74 if (cmdline_complete(cl, "buffer", NULL, dst, sizeof(dst)) >= 0) in test_cmdline_parse_fns()
76 if (cmdline_complete(cl, "buffer", &i, NULL, sizeof(dst)) >= 0) in test_cmdline_parse_fns()
79 cmdline_free(cl); in test_cmdline_parse_fns()
84 cmdline_free(cl); in test_cmdline_parse_fns()
156 struct cmdline *cl; in test_cmdline_socket_fns() local
158 cl = cmdline_stdin_new(NULL, "prompt"); in test_cmdline_socket_fns()
159 if (cl != NULL) in test_cmdline_socket_fns()
161 cl = cmdline_stdin_new(&ctx, NULL); in test_cmdline_socket_fns()
162 if (cl != NULL) in test_cmdline_socket_fns()
164 cl = cmdline_file_new(NULL, "prompt", NULL_INPUT); in test_cmdline_socket_fns()
165 if (cl != NULL) in test_cmdline_socket_fns()
167 cl = cmdline_file_new(&ctx, NULL, NULL_INPUT); in test_cmdline_socket_fns()
168 if (cl != NULL) in test_cmdline_socket_fns()
170 cl = cmdline_file_new(&ctx, "prompt", NULL); in test_cmdline_socket_fns()
171 if (cl != NULL) in test_cmdline_socket_fns()
173 cl = cmdline_file_new(&ctx, "prompt", "-/invalid/~/path"); in test_cmdline_socket_fns()
174 if (cl != NULL) { in test_cmdline_socket_fns()
176 cmdline_free(cl); in test_cmdline_socket_fns()
179 cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT); in test_cmdline_socket_fns()
180 if (cl == NULL) { in test_cmdline_socket_fns()
184 cmdline_free(cl); in test_cmdline_socket_fns()
185 cl = NULL; in test_cmdline_socket_fns()
193 cmdline_free(cl); in test_cmdline_socket_fns()
201 struct cmdline *cl; in test_cmdline_fns() local
204 cl = cmdline_new(NULL, "prompt", 0, 0); in test_cmdline_fns()
205 if (cl != NULL) in test_cmdline_fns()
207 cl = cmdline_new(&ctx, NULL, 0, 0); in test_cmdline_fns()
208 if (cl != NULL) in test_cmdline_fns()
210 cl = cmdline_new(&ctx, "test", -1, -1); in test_cmdline_fns()
211 if (cl == NULL) in test_cmdline_fns()
215 if (cmdline_in(cl, NULL, CMDLINE_TEST_BUFSIZE) >= 0) in test_cmdline_fns()
227 cmdline_free(cl); in test_cmdline_fns()
232 if (cl != NULL) in test_cmdline_fns()
233 cmdline_free(cl); in test_cmdline_fns()