summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-09 21:35:06 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-10 10:07:20 -0400
commite1b051d39fd39e24fa7f04f1f7e97e22c98f3413 (patch)
treed28efce1e5cd571d5e4ae6ae317300ff8881115e /tests
parent8065db209616b218dc3f5294f2873c5a02ac36e6 (diff)
downloadpango-e1b051d39fd39e24fa7f04f1f7e97e22c98f3413.tar.gz
tests: Add a way to show fonts in test-layout
This is sometimes useful, even if we want to avoid it in ci. So add an environment variable, PANGO_TEST_SHOW_FONT to make it show the actual font instead of 'OMITTED'.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-layout.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 4c27585e..2a57b042 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -34,6 +34,7 @@
static PangoContext *context;
+static gboolean opt_show_font;
static const gchar *
enum_value_nick (GType type, gint value)
@@ -160,7 +161,7 @@ dump_runs (PangoLayout *layout, GString *string)
i, index, item->num_chars, item->analysis.level,
gravity_name (item->analysis.gravity),
item->analysis.flags,
- "OMITTED", /* for some reason, this fails on build.gnome.org, so leave it out */
+ opt_show_font ? font : "OMITTED", /* for some reason, this fails on build.gnome.org, so leave it out */
script_name (item->analysis.script),
pango_language_to_string (item->analysis.language),
char_str);
@@ -754,6 +755,9 @@ main (int argc, char *argv[])
const gchar *name;
gchar *path;
+ if (g_getenv ("PANGO_TEST_SHOW_FONT"))
+ opt_show_font = TRUE;
+
/* allow to easily generate expected output for new test cases */
if (argc > 1 && argv[1][0] != '-')
{