public string build_filename (FileType file_type, string path_segments)
Creates the pathname to a data file that is required for a test.
The data file should either have been distributed with the module containing the test (g_test_dist) or built as part of the build system of that module (g_test_built).
In order for this function to work in srcdir != builddir situations, the G_TEST_SRCDIR and G_TEST_BUILDDIR environment variables need to have been defined. As of 2.38, this is done by the glib.mk included in GLib. Please ensure that your copy is up to date before using this function.
In case neither variable is set, this function will fall back to using the dirname portion of argv, possibly removing ".libs". This allows for casual running of tests directly from the commandline in the srcdir == builddir case and should also support running of installed tests, assuming the data files have been installed in the same relative path as the test binary.
the type of file (built vs. distributed)
the first segment of the pathname
null-terminated additional path segments
the path of the file, to be freed using g_free