summaryrefslogtreecommitdiff
path: root/app/test-cmdline/cmdline_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/test-cmdline/cmdline_test.c')
-rw-r--r--app/test-cmdline/cmdline_test.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/test-cmdline/cmdline_test.c b/app/test-cmdline/cmdline_test.c
new file mode 100644
index 0000000..3e40633
--- /dev/null
+++ b/app/test-cmdline/cmdline_test.c
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2010-2014 Intel Corporation
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <termios.h>
+#include <ctype.h>
+#include <sys/queue.h>
+
+#include <cmdline_rdline.h>
+#include <cmdline_parse.h>
+#include <cmdline_socket.h>
+#include <cmdline.h>
+
+#include "cmdline_test.h"
+
+int
+main(int __attribute__((unused)) argc, char __attribute__((unused)) ** argv)
+{
+ struct cmdline *cl;
+
+ cl = cmdline_stdin_new(main_ctx, "CMDLINE_TEST>>");
+ if (cl == NULL) {
+ return -1;
+ }
+ cmdline_interact(cl);
+ cmdline_stdin_exit(cl);
+
+ return 0;
+}