From: Matthias Clasen Date: Thu, 20 Jul 2023 15:48:13 +0000 (-0400) Subject: Make the new compose table test work X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~57^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7fb6c04e99949415f4feb2fab7a8e7b0d82bbbf6;p=gtk4.git Make the new compose table test work This just copies what we do already for other tests that check parser failures. --- diff --git a/testsuite/gtk/composetable.c b/testsuite/gtk/composetable.c index 8a552fc6e0..0ee3bac1fb 100644 --- a/testsuite/gtk/composetable.c +++ b/testsuite/gtk/composetable.c @@ -408,8 +408,23 @@ match_algorithmic (void) static void compose_table_large (void) { - char *file = g_build_filename (g_test_get_dir (G_TEST_DIST), "compose", "large", NULL); - gtk_compose_table_parse (file, NULL); + if (g_test_subprocess ()) + { + char *file; + GtkComposeTable *table; + + file = g_test_build_filename (G_TEST_DIST, "compose", "large", NULL); + + table = gtk_compose_table_parse (file, NULL); + g_assert_nonnull (table); + g_free (file); + + return; + } + + g_test_trap_subprocess (NULL, 0, 0); + g_test_trap_assert_stderr ("*can't handle compose tables this large*"); + g_test_trap_assert_failed (); } int