Convert more tests to installed tests

This makes the tests in tests installed, except for
the performance tests.
This commit is contained in:
Matthias Clasen
2013-05-20 21:05:56 -04:00
parent 1808888a1f
commit 7ff5c08221
6 changed files with 62 additions and 19 deletions

View File

@@ -12,7 +12,7 @@ int main (int argc, char **argv)
FILE *infile;
char buffer[1024];
char **strings;
char *srcdir = getenv ("srcdir");
const char *srcdir;
char *filename;
const char *locale;
const char *test;
@@ -21,10 +21,13 @@ int main (int argc, char **argv)
char *current_locale = setlocale (LC_CTYPE, NULL);
gint result = 0;
if (!srcdir)
if (g_getenv ("G_TEST_DATA"))
srcdir = g_getenv ("G_TEST_DATA");
else
srcdir = ".";
filename = g_strconcat (srcdir, G_DIR_SEPARATOR_S, "casemap.txt", NULL);
infile = fopen (filename, "r");
if (!infile)
{