summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/parser.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/parser.c b/tests/parser.c
index 694653b..ae85fc5 100644
--- a/tests/parser.c
+++ b/tests/parser.c
@@ -109,13 +109,17 @@ 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");
- is1(parse_item("wrong!", r, (pt *)NULL, error));
- 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("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, "*");
+
+ is0(parse_item("noqty2, noqty3", r, (pt *)NULL, error));
+ ck_assert_str_eq(r->i[r->in - 1]->name, "noqty3");
+ ck_assert_str_eq(r->i[r->in - 1]->qty, "*");
is0(parse_item("---", r, (pt *)NULL, error));
- ck_assert_str_eq(r->i[r->in - 1]->name, "test");
- ck_assert_str_eq(r->i[r->in - 1]->qty, "val");
+ ck_assert_str_eq(r->i[r->in - 1]->name, "noqty3");
+ ck_assert_str_eq(r->i[r->in - 1]->qty, "*");
free_recipe(r);
}