[kdbus] Do not set body message if signature field is empty
[platform/upstream/glib.git] / tests / unicode-caseconv.c
index 0563ab6..affb558 100644 (file)
@@ -12,7 +12,6 @@ int main (int argc, char **argv)
   FILE *infile;
   char buffer[1024];
   char **strings;
-  char *srcdir = getenv ("srcdir");
   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;
 
-  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)
     {
@@ -93,7 +92,7 @@ int main (int argc, char **argv)
   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)