]> Savannah Git Hosting - gnulib.git/commitdiff
trim tests: Avoid test failures on macOS 15.4.
authorBruno Haible <bruno@clisp.org>
Tue, 15 Apr 2025 14:14:07 +0000 (16:14 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 3 May 2025 14:00:48 +0000 (16:00 +0200)
* tests/test-trim.c (main): On macOS, disable test cases that fail on
macOS 15.4.

ChangeLog
tests/test-trim.c

index 4af0875be607830d338dfe998294036f4c5a31e8..081d60bbc8cdff36a879e4258cf5dda841ce53ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-04-15  Bruno Haible  <bruno@clisp.org>
+
+       trim tests: Avoid test failures on macOS 15.4.
+       * tests/test-trim.c (main): On macOS, disable test cases that fail on
+       macOS 15.4.
+
 2025-04-14  Bruno Haible  <bruno@clisp.org>
 
        c32is*, c32to* tests: Avoid test failures on macOS 15.4.
index e765f23109dbe6a362ee00c11261a864c8babc88..587883897d4fd9ae9a46d5415d31a7061603cf36 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of removing leading and/or trailing whitespaces.
-   Copyright (C) 2023-2024 Free Software Foundation, Inc.
+   Copyright (C) 2023-2025 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
@@ -137,14 +137,14 @@ main (int argc, char *argv[])
 
       case '3':
         /* Locale encoding is GB18030.  */
-        #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
         { /* U+2002 EN SPACE */
           char *result = trim ("\201\066\243\070\241\244foo\201\066\243\070");
           ASSERT (strcmp (result, "\241\244foo") == 0);
           free (result);
         }
         #endif
-        #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __illumos__)
+        #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __illumos__)
         { /* U+3000 IDEOGRAPHIC SPACE */
           char *result = trim ("\241\241\241\244foo\241\241");
           ASSERT (strcmp (result, "\241\244foo") == 0);