forked from github/server
fix broken test that didn't like the new init_locale() requirements.
This commit is contained in:
parent
6bd52012c0
commit
9f2d2e0f92
|
@ -103,7 +103,7 @@ static void test_races(CuTest * tc)
|
||||||
static void test_findrace(CuTest *tc) {
|
static void test_findrace(CuTest *tc) {
|
||||||
const char * data = "{\"races\": { \"dwarf\": {} }, \"strings\": { \"de\" : { \"race::dwarf\" : \"Zwerg\" } } }";
|
const char * data = "{\"races\": { \"dwarf\": {} }, \"strings\": { \"de\" : { \"race::dwarf\" : \"Zwerg\" } } }";
|
||||||
cJSON *json = cJSON_Parse(data);
|
cJSON *json = cJSON_Parse(data);
|
||||||
const struct locale *lang;
|
struct locale *lang;
|
||||||
const race *rc;
|
const race *rc;
|
||||||
|
|
||||||
CuAssertPtrNotNull(tc, json);
|
CuAssertPtrNotNull(tc, json);
|
||||||
|
@ -112,6 +112,7 @@ static void test_findrace(CuTest *tc) {
|
||||||
CuAssertPtrEquals(tc, 0, (void *)findrace("Zwerg", lang));
|
CuAssertPtrEquals(tc, 0, (void *)findrace("Zwerg", lang));
|
||||||
|
|
||||||
json_config(json);
|
json_config(json);
|
||||||
|
init_locale(lang);
|
||||||
rc = findrace("Zwerg", lang);
|
rc = findrace("Zwerg", lang);
|
||||||
CuAssertPtrNotNull(tc, rc);
|
CuAssertPtrNotNull(tc, rc);
|
||||||
CuAssertStrEquals(tc, "dwarf", rc->_name);
|
CuAssertStrEquals(tc, "dwarf", rc->_name);
|
||||||
|
|
Loading…
Reference in New Issue