projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
signals: Fix leak in test
[platform/upstream/glib.git]
/
tests
/
unicode-caseconv.c
diff --git
a/tests/unicode-caseconv.c
b/tests/unicode-caseconv.c
index
0563ab6
..
affb558
100644
(file)
--- a/
tests/unicode-caseconv.c
+++ b/
tests/unicode-caseconv.c
@@
-12,7
+12,6
@@
int main (int argc, char **argv)
FILE *infile;
char buffer[1024];
char **strings;
FILE *infile;
char buffer[1024];
char **strings;
- char *srcdir = getenv ("srcdir");
char *filename;
const char *locale;
const char *test;
char *filename;
const char *locale;
const char *test;
@@
-21,10
+20,10
@@
int main (int argc, char **argv)
char *current_locale = setlocale (LC_CTYPE, NULL);
gint result = 0;
char *current_locale = setlocale (LC_CTYPE, NULL);
gint result = 0;
- if (!srcdir)
- srcdir = ".";
- filename = g_
strconcat (srcdir, G_DIR_SEPARATOR_S
, "casemap.txt", NULL);
-
+ g_test_init (&argc, &argv, NULL);
+
+ filename = g_
test_build_filename (G_TEST_DIST
, "casemap.txt", NULL);
+
infile = fopen (filename, "r");
if (!infile)
{
infile = fopen (filename, "r");
if (!infile)
{
@@
-93,7
+92,7
@@
int main (int argc, char **argv)
fclose (infile);
g_free (filename);
fclose (infile);
g_free (filename);
- filename = g_
strconcat (srcdir, G_DIR_SEPARATOR_S
, "casefold.txt", NULL);
+ filename = g_
test_build_filename (G_TEST_DIST
, "casefold.txt", NULL);
infile = fopen (filename, "r");
if (!infile)
infile = fopen (filename, "r");
if (!infile)