tests: Use g_test_skip_printf()

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2021-08-05 11:51:46 +01:00
parent 182d9995ca
commit 26fbd14954
2 changed files with 13 additions and 46 deletions

View File

@@ -111,11 +111,7 @@ test_trash_symlinks (void)
if (!g_file_test (target, G_FILE_TEST_IS_DIR))
{
gchar *message;
message = g_strdup_printf ("Directory '%s' does not exist", target);
g_test_skip (message);
g_free (message);
g_test_skip_printf ("Directory '%s' does not exist", target);
g_free (target);
return;
}
@@ -124,12 +120,7 @@ test_trash_symlinks (void)
if (target_mount == NULL)
{
gchar *message;
message = g_strdup_printf ("Unable to determine mount point for %s",
target);
g_test_skip (message);
g_free (message);
g_test_skip_printf ("Unable to determine mount point for %s", target);
g_free (target);
return;
}
@@ -144,11 +135,7 @@ test_trash_symlinks (void)
if (tmp_mount == NULL)
{
gchar *message;
message = g_strdup_printf ("Unable to determine mount point for %s", tmp);
g_test_skip (message);
g_free (message);
g_test_skip_printf ("Unable to determine mount point for %s", tmp);
g_unix_mount_free (target_mount);
g_free (target);
g_free (tmp);