forked from github/server
fix failing storage test
This commit is contained in:
parent
45d09622cb
commit
d1fdd9a89c
|
@ -17,6 +17,8 @@ without prior permission by the authors of Eressea.
|
|||
#include <kernel/save.h>
|
||||
#include <kernel/version.h>
|
||||
|
||||
#include <util/log.h>
|
||||
|
||||
#include <storage.h>
|
||||
#include <stream.h>
|
||||
#include <filestream.h>
|
||||
|
@ -26,6 +28,7 @@ without prior permission by the authors of Eressea.
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <tolua.h>
|
||||
|
||||
|
@ -40,6 +43,7 @@ static int tolua_storage_create(lua_State * L)
|
|||
tolua_pushusertype(L, (void *)data, TOLUA_CAST "storage");
|
||||
return 1;
|
||||
}
|
||||
log_error("could not open %s, mode %s (%s).", filename, type, strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ int RunAllTests(int argc, char *argv[])
|
|||
ADD_SUITE(base36);
|
||||
ADD_SUITE(bsdstring);
|
||||
ADD_SUITE(functions);
|
||||
ADD_SUITE(gamedata);
|
||||
ADD_SUITE(parser);
|
||||
ADD_SUITE(password);
|
||||
ADD_SUITE(umlaut);
|
||||
|
|
|
@ -2,6 +2,7 @@ project(util C)
|
|||
|
||||
SET(_TEST_FILES
|
||||
base36.test.c
|
||||
gamedata.test.c
|
||||
parser.test.c
|
||||
password.test.c
|
||||
attrib.test.c
|
||||
|
|
|
@ -69,5 +69,5 @@ gamedata *gamedata_open(const char *filename, const char *mode, int version) {
|
|||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
return 0;
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue