From 03ff8f612da033a7547563afd677eb7ac6cf373a Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 14 Oct 2015 20:48:01 +0200 Subject: [PATCH] leaks: remember to call test_cleanup --- src/kernel/order.test.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/kernel/order.test.c b/src/kernel/order.test.c index 84dc61323..d0ba58619 100644 --- a/src/kernel/order.test.c +++ b/src/kernel/order.test.c @@ -99,8 +99,11 @@ static void test_parse_make_temp(CuTest *tc) { static void test_parse_maketemp(CuTest *tc) { char cmd[32]; order *ord; - struct locale * lang = get_or_create_locale("en"); + struct locale * lang; + + test_cleanup(); + lang = get_or_create_locale("en"); locale_setstring(lang, keyword(K_MAKE), "MAKE"); locale_setstring(lang, keyword(K_MAKETEMP), "MAKETEMP"); locale_setstring(lang, "TEMP", "TEMP"); @@ -113,17 +116,22 @@ static void test_parse_maketemp(CuTest *tc) { CuAssertIntEquals(tc, K_MAKETEMP, init_order(ord)); CuAssertStrEquals(tc, "herp", getstrtoken()); free_order(ord); + test_cleanup(); } static void test_init_order(CuTest *tc) { order *ord; - struct locale * lang = get_or_create_locale("en"); + struct locale * lang; + test_cleanup(); + + lang = get_or_create_locale("en"); ord = create_order(K_MAKETEMP, lang, "hurr durr"); CuAssertIntEquals(tc, K_MAKETEMP, init_order(ord)); CuAssertStrEquals(tc, "hurr", getstrtoken()); CuAssertStrEquals(tc, "durr", getstrtoken()); free_order(ord); + test_cleanup(); } static void test_getstrtoken(CuTest *tc) {