Some final g_test_build_filename() porting

This should be the last users that need to be ported.

For some of the oldschool non-gtester-ified tests, we call g_test_init()
from main() because it is necessary in order to use
g_test_build_filename().
This commit is contained in:
Ryan Lortie
2013-05-29 23:49:30 -04:00
parent d7b3e558cf
commit e66abbe2ef
8 changed files with 20 additions and 38 deletions

View File

@@ -1309,7 +1309,7 @@ test_load (void)
/* Uses the value of $XDG_DATA_HOME we set in main() */
loaded = g_key_file_load_from_data_dirs (file, "keyfiletest.ini", NULL, 0, &error);
#else
loaded = g_key_file_load_from_file (file, SRCDIR "/keyfiletest.ini", 0, &error);
loaded = g_key_file_load_from_file (file, g_test_get_filename (G_TEST_DIST, "keyfiletest.ini", NULL), 0, &error);
#endif
g_assert_no_error (error);
g_assert (loaded);

View File

@@ -204,7 +204,7 @@ main (int argc,
if (!g_file_test (echo_script_path, G_FILE_TEST_EXISTS))
{
g_free (echo_script_path);
echo_script_path = g_build_filename (SRCDIR, "echo-script", NULL);
echo_script_path = g_test_build_filename (G_TEST_DIST, "echo-script", NULL);
}
g_free (dirname);