MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_cmdline_rdline_fns

Function test_cmdline_rdline_fns

dpdk/app/test/test_cmdline_lib.c:88–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static int
89test_cmdline_rdline_fns(void)
90{
91 struct rdline *rdl;
92 rdline_write_char_t *wc = &cmdline_write_char;
93 rdline_validate_t *v = &valid_buffer;
94 rdline_complete_t *c = &complete_buffer;
95
96 rdl = rdline_new(NULL, v, c, NULL);
97 if (rdl != NULL)
98 goto error;
99 rdl = rdline_new(wc, NULL, c, NULL);
100 if (rdl != NULL)
101 goto error;
102 rdl = rdline_new(wc, v, NULL, NULL);
103 if (rdl != NULL)
104 goto error;
105 if (rdline_char_in(NULL, 0) >= 0)
106 goto error;
107 if (rdline_get_buffer(NULL) != NULL)
108 goto error;
109 if (rdline_add_history(NULL, "history") >= 0)
110 goto error;
111 if (rdline_add_history(rdl, NULL) >= 0)
112 goto error;
113 if (rdline_get_history_item(NULL, 0) != NULL)
114 goto error;
115
116 /* void functions */
117 rdline_get_history_buffer_size(NULL);
118 rdline_get_opaque(NULL);
119 rdline_newline(NULL, "prompt");
120 rdline_newline(rdl, NULL);
121 rdline_stop(NULL);
122 rdline_quit(NULL);
123 rdline_restart(NULL);
124 rdline_redisplay(NULL);
125 rdline_reset(NULL);
126 rdline_clear_history(NULL);
127 rdline_free(NULL);
128
129 rdline_free(rdl);
130 return 0;
131
132error:
133 printf("Error: function accepted null parameter!\n");
134 rdline_free(rdl);
135 return -1;
136}
137
138static int
139test_cmdline_vt100_fns(void)

Callers 1

test_cmdline_libFunction · 0.85

Calls 15

rdline_newFunction · 0.85
rdline_char_inFunction · 0.85
rdline_get_bufferFunction · 0.85
rdline_add_historyFunction · 0.85
rdline_get_history_itemFunction · 0.85
rdline_get_opaqueFunction · 0.85
rdline_newlineFunction · 0.85
rdline_stopFunction · 0.85
rdline_quitFunction · 0.85
rdline_restartFunction · 0.85
rdline_redisplayFunction · 0.85

Tested by

no test coverage detected