mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +01:00 
			
		
		
		
	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().
		
			
				
	
	
		
			21 lines
		
	
	
		
			453 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			453 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include <stdlib.h>
 | 
						|
#include <gio/gio.h>
 | 
						|
 | 
						|
int
 | 
						|
main (int argc, char *argv[])
 | 
						|
{
 | 
						|
  const gchar *envvar;
 | 
						|
  gint pid_from_env;
 | 
						|
 | 
						|
  envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
 | 
						|
  g_assert (envvar != NULL);
 | 
						|
  pid_from_env = atoi (envvar);
 | 
						|
  g_assert_cmpint (pid_from_env, ==, getpid ());
 | 
						|
 | 
						|
  envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
 | 
						|
  g_assert_cmpstr (envvar, ==, g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL));
 | 
						|
 | 
						|
  return 0;
 | 
						|
}
 | 
						|
 |