+2020-12-02 Bruno Haible <bruno@clisp.org>
+
+ strsignal-tests: Fix test failure on macOS 10.13.
+ Reported by Martin Storsjö <martin@martin.st> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
+ * tests/test-strsignal.c (ASSERT_DESCRIPTION): Allow the actual result
+ to be longer than the expected result.
+
2020-12-02 Bruno Haible <bruno@clisp.org>
Fix compilation errors in test-math-c++.cc on FreeBSD 12.2/arm64.
#include "macros.h"
#if HAVE_DECL_SYS_SIGLIST
-# define ASSERT_DESCRIPTION(got, expect)
+# define ASSERT_DESCRIPTION(actual, expected)
#else
-/* In this case, we can guarantee some signal descriptions. */
-# define ASSERT_DESCRIPTION(got, expect) ASSERT (!strcmp (got, expect))
+/* In this case, we can guarantee some signal descriptions.
+ But allow the actual result to be longer than the expected result. */
+# define ASSERT_DESCRIPTION(actual, expected) \
+ ASSERT (strncmp (actual, expected, strlen (expected)) == 0)
#endif
int