summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-01-06 06:34:58 -0500
committerMatthias Clasen <mclasen@redhat.com>2023-01-06 07:12:36 -0500
commit0ccf9ad8fc891a6d02aa993ec92503bb4c939226 (patch)
treefeadeaaf3a29b07a69edd2229b0ad4f933f17e3a /tests
parent52dfa543017a38ca4b5529876f0db75ecff39447 (diff)
downloadgtk+-0ccf9ad8fc891a6d02aa993ec92503bb4c939226.tar.gz
testfiledialog: Be more lenient
Accept both open_multiple and open-multiple.
Diffstat (limited to 'tests')
-rw-r--r--tests/testfiledialog.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/testfiledialog.c b/tests/testfiledialog.c
index e859d679f3..edc96793f5 100644
--- a/tests/testfiledialog.c
+++ b/tests/testfiledialog.c
@@ -231,18 +231,21 @@ main (int argc, char *argv[])
}
else if (strcmp (action, "open") == 0)
gtk_file_dialog_open (dialog, NULL, cancellable, open_done, NULL);
- else if (strcmp (action, "select_folder") == 0)
+ else if (g_pattern_match_simple ("select?folder", action) &&
+ strchr ("-_", action[strlen ("select")]))
gtk_file_dialog_select_folder (dialog, NULL, cancellable, select_done, NULL);
else if (strcmp (action, "save") == 0)
gtk_file_dialog_save (dialog, NULL, cancellable, save_done, NULL);
- else if (strcmp (action, "open_multiple") == 0)
+ else if (g_pattern_match_simple ("open?multiple", action) &&
+ strchr ("-_", action[strlen ("open")]))
gtk_file_dialog_open_multiple (dialog, NULL, cancellable, open_multiple_done, NULL);
- else if (strcmp (action, "select_multiple_folders") == 0)
+ else if (g_pattern_match_simple ("select?multiple", action) &&
+ strchr ("-_", action[strlen ("select")]))
gtk_file_dialog_select_multiple_folders (dialog, NULL, cancellable, select_multiple_done, NULL);
else
{
g_print ("invalid action: %s\n", action);
- g_print ("one of open, select_folder, save, open_multiple, select_multiple_folders\n");
+ g_print ("one of open, select-folder, save, open-multiple, select-multiple\n");
exit (1);
}