summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Udaltsov <svu@gnome.org>2008-04-21 22:37:33 +0000
committerSergey Udaltsov <svu@gnome.org>2008-04-21 22:37:33 +0000
commit068422e3a7a0aae5983cde5d57ce18e4fb5fa560 (patch)
tree10a9b45adc0bed36315c118235189d1587a78720 /tests
parentae1528e30b7e0a50660a1c69e03b077ad1010dd9 (diff)
downloadlibxklavier-068422e3a7a0aae5983cde5d57ce18e4fb5fa560.tar.gz
adding country/language functions, new dep on iso-codes
Diffstat (limited to 'tests')
-rw-r--r--tests/test_config.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_config.c b/tests/test_config.c
index 2ef07b7..c71b029 100644
--- a/tests/test_config.c
+++ b/tests/test_config.c
@@ -46,6 +46,8 @@ print_usage(void)
printf(" -am - list all available models\n");
printf
(" -ao - list all available options groups and options\n");
+ printf(" -ac - list all available ISO country codes\n");
+ printf(" -ag - list all available ISO language codes\n");
printf
(" -g - Dump the current config, load original system settings and revert back\n");
printf
@@ -129,6 +131,19 @@ print_layout(XklConfigRegistry * config, const XklConfigItem * item,
print_variant, data);
}
+static void
+print_country(XklConfigRegistry * config, const XklConfigItem * item,
+ gpointer data)
+{
+ print_xci(config, item, 0);
+}
+
+static void
+print_language(XklConfigRegistry * config, const XklConfigItem * item,
+ gpointer data)
+{
+ print_xci(config, item, 0);
+}
int
main(int argc, char *const argv[])
@@ -243,6 +258,14 @@ main(int argc, char *const argv[])
xkl_config_registry_foreach_option_group
(config, print_option_group, NULL);
break;
+ case 'c':
+ xkl_config_registry_foreach_country
+ (config, print_country, NULL);
+ break;
+ case 'g':
+ xkl_config_registry_foreach_language
+ (config, print_language, NULL);
+ break;
default:
printf("Unknown list: %c\n", which_list);
print_usage();