]> Savannah Git Hosting - gnulib.git/commitdiff
striconveh tests: Avoid test failure on glibc 2.15.
authorBruno Haible <bruno@clisp.org>
Sat, 8 Apr 2023 12:45:16 +0000 (14:45 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2023 01:57:01 +0000 (03:57 +0200)
* tests/test-striconveh.c (main): Skip some of the GB18030 tests on
glibc < 2.16.

ChangeLog
tests/test-striconveh.c

index f8aecbf879c62bcdd062c87e3a0db453c711d1e6..06d6c1d5f5760679891c1a035d358f225a7612f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-08  Bruno Haible  <bruno@clisp.org>
+
+       striconveh tests: Avoid test failure on glibc 2.15.
+       * tests/test-striconveh.c (main): Skip some of the GB18030 tests on
+       glibc < 2.16.
+
 2023-04-07  Bruno Haible  <bruno@clisp.org>
 
        unistdio/*: Fix test failures (regression 2023-01-28).
index 15627f3d0bcb02abc127a7a7f1c7bf1dd7120f5c..5e72d8e6cbe5f79de07f25a19ca07adfa3fb5394 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of character set conversion with error handling.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -462,8 +462,10 @@ main ()
         }
     }
 
-# if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
-  /* Test conversion from ASCII to GB18030 with invalid input (EILSEQ).  */
+# if defined _LIBICONV_VERSION || ((__GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2) && !defined __UCLIBC__)
+  /* Test conversion from ASCII to GB18030 with invalid input (EILSEQ).
+     Note: glibc's GB18030 converter was buggy in glibc-2.15; fixed by
+     Andreas Schwab on 2012-02-06.  */
   for (h = 0; h < SIZEOF (handlers); h++)
     {
       enum iconv_ilseq_handler handler = handlers[h];
@@ -746,8 +748,10 @@ main ()
             }
         }
 
-#   if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
-      /* Test conversion from UTF-7 to GB18030 with EILSEQ.  */
+#   if defined _LIBICONV_VERSION || ((__GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2) && !defined __UCLIBC__)
+      /* Test conversion from UTF-7 to GB18030 with EILSEQ.
+         Note: glibc's GB18030 converter was buggy in glibc-2.15; fixed by
+         Andreas Schwab on 2012-02-06.  */
       for (h = 0; h < SIZEOF (handlers); h++)
         {
           enum iconv_ilseq_handler handler = handlers[h];
@@ -985,8 +989,10 @@ main ()
         }
     }
 
-# if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
-  /* Test conversion from ASCII to GB18030 with invalid input (EILSEQ).  */
+# if defined _LIBICONV_VERSION || ((__GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2) && !defined __UCLIBC__)
+  /* Test conversion from ASCII to GB18030 with invalid input (EILSEQ).
+     Note: glibc's GB18030 converter was buggy in glibc-2.15; fixed by
+     Andreas Schwab on 2012-02-06.  */
   for (h = 0; h < SIZEOF (handlers); h++)
     {
       enum iconv_ilseq_handler handler = handlers[h];