diff options
-rw-r--r-- | tests/parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/parser.c b/tests/parser.c index ae85fc5..744c8ca 100644 --- a/tests/parser.c +++ b/tests/parser.c @@ -109,6 +109,12 @@ START_TEST(check_parse_item) ck_assert_str_eq(r->i[r->in - 1]->name, "test"); ck_assert_str_eq(r->i[r->in - 1]->qty, "val"); + is0(parse_item("test2, test3=another val ", r, (pt *)NULL, error)); + ck_assert_str_eq(r->i[r->in - 2]->name, "test2"); + ck_assert_str_eq(r->i[r->in - 2]->qty, "another val"); + ck_assert_str_eq(r->i[r->in - 1]->name, "test3"); + ck_assert_str_eq(r->i[r->in - 1]->qty, "another val"); + is0(parse_item("noqty", r, (pt *)NULL, error)); ck_assert_str_eq(r->i[r->in - 1]->name, "noqty"); ck_assert_str_eq(r->i[r->in - 1]->qty, "*"); |