bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

avoid some test failures on DragonFly BSD 6.0


From: Bruno Haible
Subject: avoid some test failures on DragonFly BSD 6.0
Date: Tue, 08 Jun 2021 01:18:46 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; )

This patch avoids some test failures on DragonFly BSD 6.0.


2021-06-07  Bruno Haible  <bruno@clisp.org>

        Avoid some test failures on DragonFly BSD 6.0.
        * tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that
        fail.
        * tests/test-c32isalpha.c (main): Likewise.
        * tests/test-c32islower.c (main): Likewise.
        * tests/test-c32isupper.c (main): Likewise.
        * tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris.

diff --git a/tests/test-c32isalnum.c b/tests/test-c32isalnum.c
index 8f61ad9..546cb8a 100644
--- a/tests/test-c32isalnum.c
+++ b/tests/test-c32isalnum.c
@@ -149,7 +149,7 @@ main (int argc, char *argv[])
           /* U+00D7 MULTIPLICATION SIGN */
           is = for_character ("\241\337", 2);
           ASSERT (is == 0);
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__)
           /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
           is = for_character ("\217\251\254", 3);
           ASSERT (is != 0);
@@ -165,7 +165,7 @@ main (int argc, char *argv[])
           is = for_character ("\243\261", 2);
           ASSERT (is != 0);
         #endif
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __NetBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__)
           /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */
           is = for_character ("\243\355", 2);
           ASSERT (is != 0);
@@ -232,9 +232,11 @@ main (int argc, char *argv[])
           is = for_character ("\243\261", 2);
           ASSERT (is != 0);
         #endif
+        #if !defined __DragonFly__
           /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */
           is = for_character ("\243\355", 2);
           ASSERT (is != 0);
+        #endif
         #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__ || defined __sun)
           /* U+10330 GOTHIC LETTER AHSA */
           is = for_character ("\220\060\322\066", 4);
diff --git a/tests/test-c32isalpha.c b/tests/test-c32isalpha.c
index 9b07186..cf6d2bc 100644
--- a/tests/test-c32isalpha.c
+++ b/tests/test-c32isalpha.c
@@ -147,7 +147,7 @@ main (int argc, char *argv[])
           /* U+00D7 MULTIPLICATION SIGN */
           is = for_character ("\241\337", 2);
           ASSERT (is == 0);
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__)
           /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
           is = for_character ("\217\251\254", 3);
           ASSERT (is != 0);
@@ -163,7 +163,7 @@ main (int argc, char *argv[])
           is = for_character ("\243\261", 2);
           ASSERT (is == 0);
         #endif
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __NetBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__)
           /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */
           is = for_character ("\243\355", 2);
           ASSERT (is != 0);
@@ -230,9 +230,11 @@ main (int argc, char *argv[])
           is = for_character ("\243\261", 2);
           ASSERT (is == 0);
         #endif
+        #if !defined __DragonFly__
           /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */
           is = for_character ("\243\355", 2);
           ASSERT (is != 0);
+        #endif
         #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__ || defined __sun)
           /* U+10330 GOTHIC LETTER AHSA */
           is = for_character ("\220\060\322\066", 4);
diff --git a/tests/test-c32islower.c b/tests/test-c32islower.c
index 0b811fd..33dfb89 100644
--- a/tests/test-c32islower.c
+++ b/tests/test-c32islower.c
@@ -156,12 +156,12 @@ main (int argc, char *argv[])
           /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
           is = for_character ("\217\252\261", 3);
           ASSERT (is == 0);
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __NetBSD__ || defined __CYGWIN__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__ || defined __CYGWIN__)
           /* U+00DF LATIN SMALL LETTER SHARP S */
           is = for_character ("\217\251\316", 3);
           ASSERT (is != 0);
         #endif
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __NetBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__)
           /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
           is = for_character ("\217\253\261", 3);
           ASSERT (is != 0);
@@ -172,7 +172,7 @@ main (int argc, char *argv[])
           /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
           is = for_character ("\217\251\250", 3);
           ASSERT (is == 0);
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __NetBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__)
           /* U+0142 LATIN SMALL LETTER L WITH STROKE */
           is = for_character ("\217\251\310", 3);
           ASSERT (is != 0);
@@ -188,9 +188,11 @@ main (int argc, char *argv[])
           /* U+3073 HIRAGANA LETTER BI */
           is = for_character ("\244\323", 2);
           ASSERT (is == 0);
+        #if !defined __DragonFly__
           /* U+FF47 FULLWIDTH LATIN SMALL LETTER G */
           is = for_character ("\243\347", 2);
           ASSERT (is != 0);
+        #endif
         }
         return 0;
 
@@ -282,9 +284,11 @@ main (int argc, char *argv[])
           is = for_character ("\201\060\211\070", 4);
           ASSERT (is != 0);
         #endif
+        #if !defined __DragonFly__
           /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
           is = for_character ("\250\246", 2);
           ASSERT (is != 0);
+        #endif
         #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
           /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
           is = for_character ("\201\060\213\067", 4);
@@ -315,9 +319,11 @@ main (int argc, char *argv[])
           /* U+3162 HANGUL LETTER YI */
           is = for_character ("\201\071\256\062", 4);
           ASSERT (is == 0);
+        #if !defined __DragonFly__
           /* U+FF47 FULLWIDTH LATIN SMALL LETTER G */
           is = for_character ("\243\347", 2);
           ASSERT (is != 0);
+        #endif
           /* U+FFDB HALFWIDTH HANGUL LETTER YI */
           is = for_character ("\204\061\241\071", 4);
           ASSERT (is == 0);
diff --git a/tests/test-c32isupper.c b/tests/test-c32isupper.c
index 5604a8f..c36f17f 100644
--- a/tests/test-c32isupper.c
+++ b/tests/test-c32isupper.c
@@ -151,7 +151,7 @@ main (int argc, char *argv[])
       case '2':
         /* Locale encoding is EUC-JP.  */
         {
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __NetBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__)
           /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
           is = for_character ("\217\252\261", 3);
           ASSERT (is != 0);
@@ -165,7 +165,7 @@ main (int argc, char *argv[])
           /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
           is = for_character ("\217\253\363", 3);
           ASSERT (is == 0);
-        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __NetBSD__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ 
|| defined __DragonFly__ || defined __NetBSD__)
           /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
           is = for_character ("\217\251\250", 3);
           ASSERT (is != 0);
@@ -184,9 +184,11 @@ main (int argc, char *argv[])
           /* U+3073 HIRAGANA LETTER BI */
           is = for_character ("\244\323", 2);
           ASSERT (is == 0);
+        #if !defined __DragonFly__
           /* U+FF27 FULLWIDTH LATIN CAPITAL LETTER G */
           is = for_character ("\243\307", 2);
           ASSERT (is != 0);
+        #endif
         }
         return 0;
 
@@ -303,9 +305,11 @@ main (int argc, char *argv[])
           /* U+3162 HANGUL LETTER YI */
           is = for_character ("\201\071\256\062", 4);
           ASSERT (is == 0);
+        #if !defined __DragonFly__
           /* U+FF27 FULLWIDTH LATIN CAPITAL LETTER G */
           is = for_character ("\243\307", 2);
           ASSERT (is != 0);
+        #endif
           /* U+FFDB HALFWIDTH HANGUL LETTER YI */
           is = for_character ("\204\061\241\071", 4);
           ASSERT (is == 0);
diff --git a/tests/test-ptsname.c b/tests/test-ptsname.c
index 5dde071..8f12fa8 100644
--- a/tests/test-ptsname.c
+++ b/tests/test-ptsname.c
@@ -102,9 +102,10 @@ main (void)
     close (fd);
   }
 
-#if defined __sun
+#if defined __sun || defined __DragonFly__
   /* Solaris has BSD-style /dev/pty[p-r][0-9a-f] files, but the function
-     ptsname() does not work on them.  */
+     ptsname() does not work on them.
+     DragonFly BSD has only /dev/ptmx.  */
   {
     int fd;
     char *result;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]