From: billh Date: Fri, 15 Jul 2005 15:55:25 +0000 (+0000) Subject: Fix make check. X-Git-Tag: AT_SPI2_CORE_0_1_3~499 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7a596245d24973223488d0f4d3a5cc7398625ce;p=platform%2Fupstream%2Fat-spi2-core.git Fix make check. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@760 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index 3f714b8..2badab7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-07-15 Bill Haneman + + * tests/test-simple.c: + (key_listener_cb): Ensure that the keystring is dup'ed instead of + relying on the old string from the key event hanging around after + the event handler returns. Fixes broken 'make check'. + 2005-06-06 Swapnil Hajare * Added Marathi (mr_IN) translations. diff --git a/test/test-simple.c b/test/test-simple.c index b85e2a9..78527fd 100644 --- a/test/test-simple.c +++ b/test/test-simple.c @@ -691,12 +691,13 @@ key_listener_cb (const AccessibleKeystroke *stroke, AccessibleKeystroke *s = user_data; *s = *stroke; + if (stroke->keystring) s->keystring = g_strdup (stroke->keystring); if (s->type == SPI_KEY_PRESSED) key_press_received = TRUE; else if (s->type == SPI_KEY_RELEASED) key_release_received = TRUE; - + return TRUE; } @@ -728,11 +729,11 @@ test_keylisteners (void) g_assert (SPI_generateKeyboardEvent ('=', NULL, SPI_KEY_SYM)); while (!(key_press_received)) g_main_context_iteration (NULL, TRUE); - fprintf (stderr, "p"); + fprintf (stderr, "p [%s]", stroke.keystring); g_assert (!strcmp (stroke.keystring, "=")); while (!(key_release_received)) g_main_context_iteration (NULL, TRUE); - fprintf (stderr, "r "); + fprintf (stderr, "r [%s]", stroke.keystring); key_press_received = FALSE; key_release_received = FALSE; }