There a two more issue related to bug 428048:

1. The warning makes the test fail, so only warn if we are going
to return with error.

2. In case EUC-JP isn't supported G_CONVERT_ERROR_FAILED may be
reported back as well.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 tests/iochannel-test.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/iochannel-test.c b/tests/iochannel-test.c
index 06a85e5..5901b34 100644
--- a/tests/iochannel-test.c
+++ b/tests/iochannel-test.c
@@ -88,10 +88,12 @@ gint main (gint argc, gchar * argv[])
     g_io_channel_set_encoding (gio_r, encoding, &gerr);
     if (gerr)
       {
-        g_warning ("%s", gerr->message);
         /* Keep going if this is just a case of iconv not supporting EUC-JP, 
see bug 428048 */
-        if (gerr->code != G_CONVERT_ERROR_NO_CONVERSION)
+        if (gerr->code != G_CONVERT_ERROR_NO_CONVERSION && gerr->code != 
G_CONVERT_ERROR_FAILED)
+        {
+          g_warning ("%s", gerr->message);
           return 1;
+        }
         g_clear_error (&gerr);
       }

--
2.8.2

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to