From f946969da0c409d35672dfd2749f1b66e96ee8a4 Mon Sep 17 00:00:00 2001 From: gramanas Date: Thu, 9 Jun 2022 22:08:15 +0300 Subject: a test --- tests/parser.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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, "*"); -- cgit v1.2.3