From 690fb31fb4b526c27c5ef4dd144b8802e3dc37c8 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 31 May 2014 04:52:53 +0200 Subject: [PATCH] gtk-reftest: Clarify --direction argument parameters ... and print a proper error message when the parameter is not recognized. --- testsuite/reftests/gtk-reftest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c index 70808f11ab..0e30d7cdc2 100644 --- a/testsuite/reftests/gtk-reftest.c +++ b/testsuite/reftests/gtk-reftest.c @@ -44,7 +44,7 @@ static const GOptionEntry test_args[] = { { "directory", 'd', 0, G_OPTION_ARG_FILENAME, &arg_base_dir, "Directory to run tests from", "DIR" }, { "direction", 0, 0, G_OPTION_ARG_STRING, &arg_direction, - "Set text direction", "DIRECTION" }, + "Set text direction", "ltr|rtl" }, { NULL } }; @@ -70,6 +70,8 @@ parse_command_line (int *argc, char ***argv) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); else if (g_strcmp0 (arg_direction, "ltr") == 0) gtk_widget_set_default_direction (GTK_TEXT_DIR_LTR); + else + g_printerr ("Invalid argument passed to --direction argument. Valid arguments are 'ltr' and 'rtl'\n"); return TRUE; }