mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 08:22:16 +01:00 
			
		
		
		
	tests: Test directories inside /tmp rather than arbitrary paths
This probably wasn’t causing any problems since it was a self-contained read only access of a non-existent path. But it’s a bit tidier to contain this all inside `/tmp`. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
		| @@ -32,13 +32,15 @@ static void | ||||
| test_dir_nonexisting (void) | ||||
| { | ||||
|   GDir *dir; | ||||
|   GError *error; | ||||
|   GError *error = NULL; | ||||
|   char *path = NULL; | ||||
|  | ||||
|   error = NULL; | ||||
|   dir = g_dir_open ("/pfrkstrf", 0, &error); | ||||
|   g_assert (dir == NULL); | ||||
|   path = g_build_filename (g_get_tmp_dir (), "does-not-exist", NULL); | ||||
|   dir = g_dir_open (path, 0, &error); | ||||
|   g_assert_null (dir); | ||||
|   g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT); | ||||
|   g_error_free (error); | ||||
|   g_free (path); | ||||
| } | ||||
|  | ||||
| static void | ||||
|   | ||||
		Reference in New Issue
	
	Block a user