From e19b386e7fff428ed4c9dfb337cfc2510ef28229 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 17 Jun 2020 00:29:23 +0200 Subject: [PATCH] fix tests for parsing single-letter keywords. --- src/kernel/order.test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kernel/order.test.c b/src/kernel/order.test.c index 14cdeb157..1ce993a69 100644 --- a/src/kernel/order.test.c +++ b/src/kernel/order.test.c @@ -103,7 +103,8 @@ static void test_parse_make(CuTest *tc) { locale_setstring(lang, keyword(K_MAKE), "MAKE"); locale_setstring(lang, keyword(K_MAKETEMP), "MAKETEMP"); init_locale(lang); - ord = parse_order("M hurrdurr", lang); + CuAssertPtrEquals(tc, NULL, parse_order("M herp", lang)); + ord = parse_order("MA hurrdurr", lang); CuAssertPtrNotNull(tc, ord); CuAssertIntEquals(tc, K_MAKE, getkeyword(ord)); CuAssertStrEquals(tc, "MAKE hurrdurr", get_command(ord, lang, cmd, sizeof(cmd))); @@ -163,7 +164,8 @@ static void test_parse_make_temp(CuTest *tc) { locale_setstring(lang, parameters[P_TEMP], "TEMP"); init_locale(lang); - ord = parse_order("M T herp", lang); + CuAssertPtrEquals(tc, NULL, parse_order("M T herp", lang)); + ord = parse_order("MA TE herp", lang); CuAssertPtrNotNull(tc, ord); CuAssertIntEquals(tc, K_MAKETEMP, getkeyword(ord)); CuAssertStrEquals(tc, "MAKETEMP herp", get_command(ord, lang, cmd, sizeof(cmd)));