9 char cmdline[256] =
"one two three four five six seven eight nine ten";
10 const char *cmdlines[11] = { 0 };
11 size_t cmdlines_count = 0;
29 char cmdline[256] =
"one=nana";
30 const char *cmdlines[2] = { 0 };
31 size_t cmdlines_count = 0;
40 char cmdline[256] =
"one=nana1,nana2,nana3,nana4,false";
41 const char *cmdlines[2] = { 0 };
42 size_t cmdlines_count = 0;
51 char cmdline[256] =
"one=nana1,nana2,nana3,nana4,false two=nana1,nana2,nana3,nana4,false three=nana1,nana2,nana3,nana4,true";
52 const char *cmdlines[4] = { 0 };
53 size_t cmdlines_count = 0;
64 char cmdline[256] =
"one=\"nana1,nana2,nana3,nana4,false\" two=\"nana1,nana2,nana3,nana4,false\" three=\"nana1,nana2,nana3,nana4,true\"";
65 const char *cmdlines[4] = { 0 };
66 size_t cmdlines_count = 0;
77 char cmdline[256] =
"one=\"nana1 nana2 nana3 nana4 false\" two=\"nana1 nana2 nana3 nana4 false\" three=\"nana1 nana2 nana3 nana4 true\"";
78 const char *cmdlines[4] = { 0 };
79 size_t cmdlines_count = 0;
90 char cmdline[256] =
"one=\"nana1 nana2,nana3 nana4 false\" two=\"nana1 nana2,nana3 nana4 false\" three=\"nana1 nana2,nana3 nana4 true\"";
91 const char *cmdlines[4] = { 0 };
92 size_t cmdlines_count = 0;
103 char cmdline[256] =
"one=\"nana1=nana2,nana3=nana4 false\" two=\"nana1=nana2,nana3=nana4 false\" three=\"nana1=nana2,nana3=nana4 true\"";
104 const char *cmdlines[4] = { 0 };
105 size_t cmdlines_count = 0;
117 "one=\"nana1=\\\"nana2\\\",nana3=\\\"nana4\\\" false\" two=\"nana1=\\\"nana2\\\",nana3=\\\"nana4\\\" false\" three=\"nana1=\\\"nana2\\\",nana3=\\\"nana4\\\" true\"";
118 const char *cmdlines[4] = { 0 };
119 size_t cmdlines_count = 0;
bool cmdline_parse_inplace(char *inbuf, size_t length, size_t cmdline_max, size_t *cmdlines_count, const char **cmdlines)
static size_t strlen(const char *s)
static void one_arg_with_an_option(mos_test_result_t *, bool *, bool *)
static void quoted_args_with_spaces_and_commas_and_equals(mos_test_result_t *, bool *, bool *)
static void quoted_args_with_spaces(mos_test_result_t *, bool *, bool *)
static void quoted_args_with_spaces_and_commas(mos_test_result_t *, bool *, bool *)
static void simple_cmdline(mos_test_result_t *, bool *, bool *)
static void quotation_with_escaped_quotation_marks(mos_test_result_t *, bool *, bool *)
static void one_arg_with_multiple_options(mos_test_result_t *, bool *, bool *)
static void quoted_args(mos_test_result_t *, bool *, bool *)
static void multi_args_with_multiple_options(mos_test_result_t *, bool *, bool *)
#define MOS_TEST_CHECK(actual, expected)
#define MOS_TEST_CHECK_STRING(actual, expected)
#define MOS_TEST_CASE(_TestName)