summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2022-06-09 22:08:15 +0300
committergramanas <anastasis.gramm2@gmail.com>2022-06-09 22:08:15 +0300
commitf946969da0c409d35672dfd2749f1b66e96ee8a4 (patch)
tree9078a967977b33301dc7da3a6b12e7f7c74d3e09
parentcc2be7400d8e669059a6c57066f973463faa5ad2 (diff)
downloadfoodtools-f946969da0c409d35672dfd2749f1b66e96ee8a4.tar.gz
foodtools-f946969da0c409d35672dfd2749f1b66e96ee8a4.tar.bz2
foodtools-f946969da0c409d35672dfd2749f1b66e96ee8a4.zip
a test
-rw-r--r--tests/parser.c6
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, "*");