| |
@@ -0,0 +1,97 @@
|
| |
+ diff --git a/src/tests/ibus-compose-locales.in b/src/tests/ibus-compose-locales.in
|
| |
+ index fad02965..d64a19cb 100755
|
| |
+ --- a/src/tests/ibus-compose-locales.in
|
| |
+ +++ b/src/tests/ibus-compose-locales.in
|
| |
+ @@ -7,19 +7,27 @@ BUILDDIR=`dirname $0`
|
| |
+ export IBUS_COMPOSE_CACHE_DIR=$PWD
|
| |
+
|
| |
+ retval=0
|
| |
+ +# Let for-loop notice '\n' as a delimiter
|
| |
+ +IFS=$'\n'
|
| |
+ for var in `cat $SRCDIR/ibus-compose.env`
|
| |
+ do
|
| |
+ + # Revert IFS to recognize env a=foo b=foo
|
| |
+ + IFS=' '
|
| |
+ IS_COMMENT=`echo "$var" | grep "^#"`
|
| |
+ if [ "x$IS_COMMENT" != x ] ; then
|
| |
+ continue
|
| |
+ fi
|
| |
+ + echo "Starting $var $BUILDDIR/ibus-compose $SRCDIR $@"
|
| |
+ env $var $BUILDDIR/ibus-compose $SRCDIR $@
|
| |
+ retval=`expr $retval + $?`
|
| |
+ + echo "Finished $retval in $var $BUILDDIR/ibus-compose $SRCDIR $@"
|
| |
+
|
| |
+ CACHE_FILES=`ls *.cache`
|
| |
+ if [ x"$CACHE_FILES" != x ] ; then
|
| |
+ echo "Clean $CACHE_FILES"
|
| |
+ rm $CACHE_FILES
|
| |
+ fi
|
| |
+ + IFS=$'\n'
|
| |
+ done
|
| |
+ +IFS=' '
|
| |
+ exit $retval
|
| |
+ diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c
|
| |
+ index db359477..980972fc 100644
|
| |
+ --- a/src/tests/ibus-compose.c
|
| |
+ +++ b/src/tests/ibus-compose.c
|
| |
+ @@ -331,20 +331,31 @@ create_window ()
|
| |
+ static void
|
| |
+ test_compose (void)
|
| |
+ {
|
| |
+ + GLogLevelFlags flags;
|
| |
+ + g_debug ("test test_compose\n");
|
| |
+ if (!register_ibus_engine ()) {
|
| |
+ g_test_fail ();
|
| |
+ return;
|
| |
+ }
|
| |
+ + g_debug ("test2 test_compose\n");
|
| |
+
|
| |
+ create_window ();
|
| |
+ + /* FIXME:
|
| |
+ + * IBusIMContext opens GtkIMContextSimple as the slave and
|
| |
+ + * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the
|
| |
+ + * multiple outputs in el_GR's compose causes a warning in gtkcomposetable
|
| |
+ + * and the warning always causes a fatal in GTest:
|
| |
+ + " "GTK+ supports to output one char only: "
|
| |
+ + */
|
| |
+ + g_debug ("test3 test_compose\n");
|
| |
+ + flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
|
| |
+ gtk_main ();
|
| |
+ -
|
| |
+ + g_log_set_always_fatal (flags);
|
| |
+ }
|
| |
+
|
| |
+ int
|
| |
+ main (int argc, char *argv[])
|
| |
+ {
|
| |
+ - GLogLevelFlags flags;
|
| |
+ const gchar *test_name;
|
| |
+ gchar *test_path;
|
| |
+
|
| |
+ @@ -354,17 +365,10 @@ main (int argc, char *argv[])
|
| |
+ */
|
| |
+ g_setenv ("NO_AT_BRIDGE", "1", TRUE);
|
| |
+ g_test_init (&argc, &argv, NULL);
|
| |
+ - /* FIXME:
|
| |
+ - * IBusIMContext opens GtkIMContextSimple as the slave and
|
| |
+ - * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the
|
| |
+ - * multiple outputs in el_GR's compose causes a warning in gtkcomposetable
|
| |
+ - * and the warning always causes a fatal in GTest:
|
| |
+ - " "GTK+ supports to output one char only: "
|
| |
+ - */
|
| |
+ - flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
|
| |
+ + g_debug ("test ibus-compose\n");
|
| |
+ gtk_init (&argc, &argv);
|
| |
+ - g_log_set_always_fatal (flags);
|
| |
+
|
| |
+ + g_debug ("test2 ibus-compose\n");
|
| |
+ m_srcdir = argc > 1 ? g_strdup (argv[1]) : g_strdup (".");
|
| |
+ m_compose_file = g_strdup (g_getenv ("COMPOSE_FILE"));
|
| |
+ #if GLIB_CHECK_VERSION (2, 58, 0)
|
| |
+ @@ -376,5 +380,6 @@ main (int argc, char *argv[])
|
| |
+ g_test_add_func (test_path, test_compose);
|
| |
+ g_free (test_path);
|
| |
+
|
| |
+ + g_debug ("test3 ibus-compose\n");
|
| |
+ return g_test_run ();
|
| |
+ }
|
| |